> [nicholas - Wed Jun 01 08:09:31 2005]: > > This is a bug report for perl from [EMAIL PROTECTED], > generated with the help of perlbug 1.35 running under perl v5.9.3. > > > ----------------------------------------------------------------- > [Please enter your report here] > > Darwin provides 2 extra malloc() functions: > > The malloc_size() function returns the size of the memory block > that > backs the allocation pointed to by ptr. The memory block size is > always > at least as large as the allocation it backs, and may be larger. > > The malloc_good_size() function rounds size up to a value that > the allo- > cator implementation can allocate without adding any padding and > returns > that rounded up value. > > It's not clear if any other malloc implementations provide these > functions, or > the same functionality with another name, apart from Perl's own > malloc's > malloced_size > > It would be useful to probe for them, because if they either are found > it would > allow efficiency savings in various places. Specifically when buffers > allocated > for SvPVX() we could set SvLEN() to the true maximum length, and AV > storage > extension could be tuned to use all the memory malloc() actually gave > us. >
The detection was added to Configure with change #25387. Now, just wait for someone to make good use of it.