| 115 | |
| 116 | |
| 117 | void *dObStack::next (int num_bytes) |
| 118 | { |
| 119 | // this functions like alloc, except that no new storage is ever allocated |
| 120 | if (!current_arena) return 0; |
| 121 | current_ofs += num_bytes; |
| 122 | ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); |
| 123 | if (current_ofs >= current_arena->used) { |
| 124 | current_arena = current_arena->next; |
| 125 | if (!current_arena) return 0; |
| 126 | current_ofs = sizeof (Arena); |
| 127 | ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); |
| 128 | } |
| 129 | return ((char*) current_arena) + current_ofs; |
| 130 | } |
no outgoing calls
no test coverage detected