develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #134237] A Metaconfig probe for malloc_usable_size

From:
Richard
Date:
June 30, 2019 08:17
Subject:
[perl #134237] A Metaconfig probe for malloc_usable_size
Message ID:
rt-4.0.24-10720-1561882623-1662.134237-75-0@perl.org
# New Ticket Created by  Richard 
# Please include the string:  [perl #134237]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134237 >


Hi,

As mentioned on IRC, malloc_usable_size
(http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html) seems
to be pretty common amongst Linux and BSD malloc implementations
nowadays. Metaconfig has a probe for the similar malloc_size on
Darwin, added in
https://perl5.git.perl.org/metaconfig.git/commit/83994881900edacd8c4e4d6534b1545554bb8274

Should a probe for malloc_usable_size should have its own file or be
appended to d_malloc_size.U due to the functional similarity?
Speculative patches are attached. (Once in, the intention is to add an
alternative definition to Perl_safesysmalloc_size.)

xenu pointed out that it would be useful to capture the minimum
allocation in a variable (e.g. MIN_MALLOC_SIZE). Where would be the
best place to do so?

Best Regards,
Richard



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About