Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0 | Siddhesh Poyarekar | 2012-09-05 | 1 | -0/+49 |
[BZ #1349] malloc_usable_size returns the usable size in an allocated chunk, which may be >= the requested size. In the case of MALLOC_CHECK_ being exported to > 0 however, only the requested size is usable, since a magic value is written at the end of the request size to trap writes beyond request bounds. Hence, when MALLOC_CHECK_ is exported to > 0, malloc_usable_size() should return the request size. |