This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ 20628] make mallinfo saturating


It would be more backward-compatible to represent minor overflows as negative numbers that are equivalent to the correct answers modulo (UINT_MAX + 1). That way, callers can continue to retrieve the correct values by casting int to unsigned. The code can use -1 to represent a value greater than UINT_MAX. This all should be doable just as efficiently as the proposed patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]