This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[Ada] Speed up memory management


This patch speeds up "new" and Unchecked_Deallocation in simple cases.
No change in behavior; no test available.

Tested on x86_64-pc-linux-gnu, committed on trunk

2016-05-02  Bob Duff  <duff@adacore.com>

	* s-memory.adb (Alloc, Realloc): Move checks
	for Size = 0 or size_t'Last into the Result = System.Null_Address
	path for efficiency. Improve comments (based on actual C language
	requirements for malloc).
	* exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
	case where we are using the default Global_Pool_Object, and we
	don't need the heavy finalization machinery.

Attachment: difs
Description: Text document


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