Barry Smith <[email protected]> writes: > How to handle MallocK() where say the second item has length zero?
You mean in optimized mode? (Debug mode can and should call malloc(0) every time.) I think either NULL or the same address is fine. We don't have sentinels in optimized mode anyway. > Do we return a NULL for that item (as current code), the same > address as the previous object (means if the user writes to that > location they have bugs that are difficult to detect) or the > special value that malloc(0) returns (how to get that special > value? We can't call malloc(0) each time because there is no place > to call free() on them with the FreeK().
signature.asc
Description: PGP signature
