summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1510e82)
Otherwise, when later we do cell.capacity == 0 we're using uninitialized
memory and can return the wrong result if we're not lucky enough to get 0s.
// No luck still, allocate new memory
cell = cast(Cell*) cstdlib.malloc(size + Cell.sizeof);
// No luck still, allocate new memory
cell = cast(Cell*) cstdlib.malloc(size + Cell.sizeof);
+ cell.capacity = 0; // so we can later tell it's new