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,RFA] Ensure check_may_shrink_heap always returns the final value


The substance of the change is OK.  But I don't like the variable
names.  Using "global" in the name of something that is not in global
scope looks odd (I realize you intended a different sense of "global",
but still).  Also, while you're there you can replace __builtin_expect
with __glibc_likely.

I'm inclined to say the cleanest thing would be to factor out the
nontrivial code into a subroutine, so you can just write:

	if (__glibc_unlikely (may_shrink_heap < 0))
	  may_shrink_heap = __libc_enable_secure || overcommit_disabled ();
	return may_shrink_heap;


Thanks,
Roland


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