CPC G06F 8/4434 (2013.01) [G06F 8/42 (2013.01); G06F 8/433 (2013.01); G06F 12/02 (2013.01); G06F 12/06 (2013.01); G06F 2212/1008 (2013.01)] | 16 Claims |
1. A method of automatically generating a header file to define memory pools for deterministic memory allocation, the method comprising using at least one hardware processor to:
receive bitcode representing compiled source code of an application, wherein the source code comprises an allocation function for allocating memory that calls a dummy function using one or more parameters; and
automatically,
scan the bitcode to detect each call to the dummy function in the bitcode,
for each detected call to the dummy function, extract the one or more parameters used in the detected call to the dummy function, and generate an allocation record from the extracted one or more parameters, and
generate a header file based on the generated allocation records;
wherein receiving the bitcode comprises compiling the source code into the bitcode, and wherein the method further comprises using the at least one hardware processor to, after generating the header file, recompile the source code with the header file;
wherein the header file comprises a definition of one or more buckets and a definition of each of one or more memory pools, and wherein the definition of each of the one or more memory pools identifies at least one of the one or more buckets.
|