Mercurial > vim
comparison src/memfile.c @ 1166:6eb9fc75ab0b
updated for version 7.1a
author | vimboss |
---|---|
date | Sun, 06 May 2007 14:15:36 +0000 |
parents | bffbbb566d6b |
children | a49d06539452 |
comparison
equal
deleted
inserted
replaced
1165:07e344834e6c | 1166:6eb9fc75ab0b |
---|---|
323 mf_new(mfp, negative, page_count) | 323 mf_new(mfp, negative, page_count) |
324 memfile_T *mfp; | 324 memfile_T *mfp; |
325 int negative; | 325 int negative; |
326 int page_count; | 326 int page_count; |
327 { | 327 { |
328 bhdr_T *hp; /* new bhdr_T */ | 328 bhdr_T *hp; /* new bhdr_T */ |
329 bhdr_T *freep; /* first block in free list */ | 329 bhdr_T *freep; /* first block in free list */ |
330 char_u *p; | 330 char_u *p; |
331 | 331 |
332 /* | 332 /* |
333 * If we reached the maximum size for the used memory blocks, release one | 333 * If we reached the maximum size for the used memory blocks, release one |
334 * If a bhdr_T is returned, use it and adjust the page_count if necessary. | 334 * If a bhdr_T is returned, use it and adjust the page_count if necessary. |
335 */ | 335 */ |
346 { | 346 { |
347 /* | 347 /* |
348 * If the block in the free list has more pages, take only the number | 348 * If the block in the free list has more pages, take only the number |
349 * of pages needed and allocate a new bhdr_T with data | 349 * of pages needed and allocate a new bhdr_T with data |
350 * | 350 * |
351 * If the number of pages matches and mf_release did not return a bhdr_T, | 351 * If the number of pages matches and mf_release() did not return a |
352 * use the bhdr_T from the free list and allocate the data | 352 * bhdr_T, use the bhdr_T from the free list and allocate the data |
353 * | 353 * |
354 * If the number of pages matches and mf_release returned a bhdr_T, | 354 * If the number of pages matches and mf_release() returned a bhdr_T, |
355 * just use the number and free the bhdr_T from the free list | 355 * just use the number and free the bhdr_T from the free list |
356 */ | 356 */ |
357 if (freep->bh_page_count > page_count) | 357 if (freep->bh_page_count > page_count) |
358 { | 358 { |
359 if (hp == NULL && (hp = mf_alloc_bhdr(mfp, page_count)) == NULL) | 359 if (hp == NULL && (hp = mf_alloc_bhdr(mfp, page_count)) == NULL) |