CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the U.S. national phase of the International Patent Application No. PCT/FR2018/052140 filed Sep. 3, 2018, which claims the benefit of French Application No. 17 58134 filed Sep. 4, 2017, the entire content of which is incorporated herein by reference.

FIELD

The disclosure relates to the processing of digital data executed by computer means, and more particularly to the memory management required in this context.

BACKGROUND

In a known way, in information technology, the term “allocation” denotes the mechanism for reserving locations in a memory for the storage therein of variables or objects, which may be highly complex and of large size. The counterpart of allocation, deallocation, is the mechanism by which the allocated memory is released.

Among the principles currently used for governing the allocation of data processing objects to a memory, the principle of allocation to a stack, also known as stack allocation, may be mentioned. This principle is based on the use of a pointer which designates the first available memory address. The object that is allocated to the memory is then stored subsequently at this address, and the pointer is updated on the basis of this memory address and the size of the allocated object.

This allocation principle is particularly useful because it is simple to implement and therefore has high performance, but it requires the deallocation to be symmetrical with the allocation. In other words, among the objects present in the memory at a given instant, the last object created must be the first to be destroyed. This operation is known by the abbreviation LIFO, for “Last In First Out”.

In very many applications, because the different objects of data processing have widely varying uses, they can only be adapted with difficulty and/or with lower performance to allocation and deallocation corresponding to stack operation of the memory. Consequently, the principle of memory management required for data processing usually has to be of increased complexity.

The present disclosure resolves this problem.

SUMMARY

For this purpose, the disclosure relates to a method for executing data processing, the method being implemented by computer means and comprising:

for a plurality of objects of the data processing, conducting an analysis of a computer code of the data processing defining a use of said objects in the data processing,

on the basis of the analysis of the computer code, allocating each object to one of a plurality of memory areas for the construction and then the destruction of each object in the corresponding memory area during the data processing, in such a way that, during the data processing, each memory area exhibits stack operation.

According to an embodiment, at least two memory areas form separate areas of the same memory entity.

According to an embodiment, the two memory areas have respective starting locations defined by respective opposite ends of the memory entity.

According to an embodiment, each of the two memory areas is associated with a pointer configured to point toward a first free space of the memory area concerned, the pointer of each of the two memory areas being configured to move closer to the pointer of the other memory area for the construction of an object in the memory area concerned.

According to an embodiment, at least two areas belong to different memory entities.

According to an embodiment, conducting an analysis of the computer code includes, for each object of some or all of the objects, determining a start and an end of the use of the object in the data processing, the allocation of the object to the corresponding memory area being carried out on the basis of the start and end of the use of the object.

According to an embodiment, for at least one object, said object is allocated to the corresponding memory area on the basis of the value of a definition parameter of said object representative of one memory area from among the plurality of memory areas, said value being recorded in said code before the analysis of the computer code.

According to an embodiment, the method further comprises compiling the computer code for the production of one or more executable files that are executed during the data processing, the compilation comprising, for at least one object, inserting, into a transformed computer code generated on the basis of said computer code for the production of the executable file or files, a call to a destructor configured to destroy said object of the corresponding memory area immediately at the end of the use of said object.

According to an embodiment, for at least one object, the object is allocated to a memory area at an instant when the size of the object in the memory area is not known.

The disclosure also relates to a computer program comprising instructions for implementing the method as defined above, when these instructions are executed by a processor.

The disclosure also relates to a device configured to be used for the execution of data processing, the device comprising an analysis module configured for:

for a plurality of objects of the data processing, conducting an analysis of a computer code of the data processing defining a use of said objects in the data processing,

on the basis of the analysis of the computer code, allocating each object to one of a plurality of memory areas of a memory module for the construction and then the destruction of each object in the corresponding memory area during the data processing, in such a way that, during the data processing, each memory area exhibits stack operation.

