Actions
Feature #8546
closedwant recallocarray(3C) and freezero(3C)
Start date:
2017-07-28
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
another openbsd compatibility functions:
The recallocarray() function is similar to reallocarray() except it ensures newly allocated memory is cleared similar to calloc(). If ptr is NULL, oldnmemb is ignored and the call is equivalent to calloc(). If ptr is not NULL, oldnmemb must be a value such that oldnmemb * size is the size of the earlier allocation that returned ptr, otherwise the behaviour is undefined. The freezero() function is similar to the free() function except it ensures memory is explicitly discarded. If ptr is NULL, no action occurs. If ptr is not NULL, the size argument must be equal or smaller than the size of the earlier allocation that returned ptr. freezero() guarantees the memory range starting at ptr with length size is discarded while deallocating the whole object originally allocated.
Updated by Electric Monk over 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 30 to 100
git commit f1cdbd3731f01314c1d46f05280ad63f1770fdc6
commit f1cdbd3731f01314c1d46f05280ad63f1770fdc6 Author: Yuri Pankov <yuri.pankov@nexenta.com> Date: 2017-07-29T22:55:08.000Z 8546 want recallocarray(3C) and freezero(3C) Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Robert Mustacchi <rm@joyent.com>
Actions