Re: [RFC] how to get the size of a malloc(9) block ?

From: jb <jb.1234abcd_at_gmail.com>
Date: Thu, 5 Dec 2013 21:29:41 +0000 (UTC)
jb <jb.1234abcd <at> gmail.com> writes:

> ... 
> So far, the options could be as follows:
> - realloc_flags(p, s, option)
>   where option is one or a combination (where appropriate) of:
>   REALLOCF_ANY                - default (move or no-move; regular
>                                 realloc())

Actually, the REALLOCF_ANY flag is not needed to be able to call default
behavior, like in realloc_flags(p, s).

>   REALLOCF_NO_MOVE            - no-move
>   REALLOCF_ELASTIC            - combined with REALLOCF_NO_MOVE
>   REALLOCF_FORCE              - combined with REALLOCF_NO_MOVE
>   REALLOCF_FALLBACK_ANY       - combined with REALLOCF_NO_MOVE or its 
>                                 derivatives like REALLOCF_ELASTIC, etc

So, the REALLOCF_FALLBACK_ANY could be just renamed to REALLOCF_DEFAULT.
This way we reduced the number of option tags to four :-)
jb
Received on Thu Dec 05 2013 - 20:30:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC