US 11,886,332 B2
Dynamic memory allocation methods and systems
Hector Marco Gisbert, Paisley (GB); and Jose Ismael Ripoll Ripoll, Valencia (ES)
Assigned to UNIVERSITAT POLITECNICA DE VALENCIA, Valencia (ES); and CYBER INTELLIGENCE S.L., Valencia (ES)
Filed by University of the West of Scotland, Paisley (GB); and Universitat Politecnica de Valencia, Valencia (ES)
Filed on Oct. 29, 2021, as Appl. No. 17/452,833.
Claims priority of provisional application 63/107,745, filed on Oct. 30, 2020.
Prior Publication US 2022/0137841 A1, May 5, 2022
Int. Cl. G06F 12/02 (2006.01); G06F 3/06 (2006.01); G06F 8/41 (2018.01)
CPC G06F 12/023 (2013.01) [G06F 3/064 (2013.01); G06F 3/0631 (2013.01); G05B 2219/34403 (2013.01); G06F 8/434 (2013.01); G06F 8/443 (2013.01); G06F 8/4434 (2013.01)] 14 Claims
OG exemplary drawing
 
1. In a dynamic memory allocator, a method of allocating memory to a process, the method comprising executing on a processor the steps of:
creating one or more arenas within the memory, each arena comprising one or more memory blocks and each arena having an n-byte aligned arena address;
upon receiving a memory request from the process, returning a pointer to the process, the pointer having as its value an address of a memory block selected from one of the arenas;
upon determining that the memory block is no longer needed by the process, retrieving the address of said memory block from the pointer and releasing the memory block;
upon a new arena being created, shifting forward the n-byte aligned address of said new arena according to a stored variable such that each memory block of said new arena is also shifted by the stored variable, the stored variable having n bytes and the stored variable having a random value.