diff options
Diffstat (limited to 'include/08.heap/deo14')
| -rw-r--r-- | include/08.heap/deo14 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/08.heap/deo14 b/include/08.heap/deo14 new file mode 100644 index 0000000..8bfb6f0 --- /dev/null +++ b/include/08.heap/deo14 @@ -0,0 +1,4 @@ + /* iterate blocks */ + for (b = heap->fblock; b; b = b->next) { + /* check if block has enough room */ + if (b->size - (b->used * b->bsize) >= size) { |
