| 5359 | |
| 5360 | |
| 5361 | ResultType DerefList::Push() |
| 5362 | { |
| 5363 | if (count == size) |
| 5364 | { |
| 5365 | const int block_size = 128; // In most cases one allocation will be enough. |
| 5366 | DerefType *p = (DerefType *)realloc(items, (size + block_size) * sizeof(DerefType)); |
| 5367 | if (!p) |
| 5368 | return MemoryError(); |
| 5369 | items = p; |
| 5370 | size += block_size; |
| 5371 | } |
| 5372 | ++count; |
| 5373 | return OK; |
| 5374 | } |
| 5375 | |
| 5376 | |
| 5377 |
no test coverage detected