Information
-
Patent Application
-
20040098554
-
Publication Number
20040098554
-
Date Filed
September 18, 200320 years ago
-
Date Published
May 20, 200420 years ago
-
CPC
-
US Classifications
-
International Classifications
Abstract
This invention concerns an optimised management method for allocating memory space of an onboard system to a data structure and a corresponding onboard system. The object code packets and the data packets being discriminated, and the memory being subdivided into addressable elementary memory blocks, the method consists in allocating (A1) to the object code packets a set of elementary memory blocks located in a first memory space (MS1) to addresses substantially adjacent and to the data packets another set of elementary memory blocks located in a second memory range (MS2). This enables to avoid fragmentation of the memory zone, during successive installations/deinstallations and to implement very easily an optimal defragmentation procedure, adapted to each type of data, code or application data.
Description
[0001] This invention relates to an optimised management method for memory allocation of an onboard computer system, called onboard system, and the corresponding onboard system.
[0002] The onboard systems now available on the market, such as in particular the digital assistants, microprocessor or micro-controller cards, cards of the PCMCIA type, portable data processing units, also called “notebook” or “sub-notebook”, have as common characteristics, often contradictory, the reduction of their size and footprint and the increase in their functionality, using, in particular, the continuous progress in the computation power of microprocessors or micro-controllers onboard in them.
[0003] Due to the above-mentioned evolution, the onboard systems tend to reproduce in the most possible faithful manner any microcomputer functionality, except however the functionalities offered by a possible connection of equipment or items peripheral to them.
[0004] Among one of the types of the functional mode of onboard systems likely to limit the reconciliation of their functionalities with those of micro-computers, the one relating to the management mode of the available memory space seems critical, because, for the time being, such a management mode seems reduced to the minimum.
[0005] Indeed, if the onboard system is made of a card with a microprocessor, also called chip card, as shown on FIG. 1, this onboard system marked 10 comprises classically some input/output circuits I/O, marked 12, information processing resources, marked 14, made of a micro-controller and connected to the input/output circuits 12. Further, a non-volatile memory 18 is provided, which consists of a programmable memory 18a and a ROM memory, or a memory with reading access only 18b. Finally, a working memory RAM marked 16 is also provided. These memories are connected to the micro-controller or microprocessor 14 via a BUS link. The whole is managed by an operating system OS, which can be onboard in the non-volatile memory 18. Finally, in some cases, the microprocessor card may have a CRYPTO calculation unit SI, marked 20, itself connected to the microprocessor 14, and acting, somehow, as a dedicated co-processor.
[0006] The microprocessor itself may be replaced or completed by logical circuits onboard in a semiconductor chip, such logical circuits being possibly ASCI-type circuits (Application Specific Integrated Circuits).
[0007] Management of the memory field is classically executed, for installing for instance multiple applications, by a reference made of a pointer, linking a starting address with an end of memory field address relating to an application.
[0008] When executing these applications, packs of data relating to such applications are written at any address in this memory field, the only criterion for memory allocation and for writing being a criterion of free memory field sufficient between a beginning pointer and an end pointer, to allow memorising a pack of data of a known size.
[0009] With successive applications installation/de-installation procedures in the corresponding memory field, free memory field spaces are created in which object code packs, or data, may be written and memorised.
[0010] Such an operation process leads to a breaking-up phenomenon, also called fragmentation, for the memory field considered.
[0011] The above mentioned breaking up or fragmentation has, just as in case of fragmentation of the hard disk memory field in microcomputers, grave inconveniences, such as the slowing down of considered applications or programmes execution, and the non optimised use of the memory field for the onboard system.
[0012] This invention has the aim of remedy the above mentioned inconveniences in onboard systems of the previous art.
[0013] Consequently, an aim of this invention is to implement an optimised management method for the dynamic storage allocation to a data structure or an identified application using an identification number and memorised in the form of digital information packs in the memory field of an onboard system, by which process the elementary memory field is subdivided into elementary memory blocks organised according to an addressable network.
[0014] Another aim of this invention is therefore to implement an optimised management method for the dynamic storage allocation in an onboard system in which, with the storage field being divided into elementary storage blocks, and the allocated block elementary blocks rearrangement process, the breaking up or fragmentation phenomenon of the storage field of the onboard system is mostly eliminated.
[0015] Another aim of this invention is therefore the implementation of an optimised management method for the dynamic storage allocation in an onboard system in which a process of defragmentation of its memory field enables a near elimination of any breaking up phenomenon further to deletion of an application.
[0016] The optimised management method for the dynamic storage allocation to a data structure identified by a digital identification number in the memory field of an onboard system, the subject of this invention, is implemented starting from information packs made of object code packs representing this data structure and data packs related to such data structure, with the memory field being subdivided into addressable elementary memory blocks. It consists in allocating to the object code packs a set of elementary memory blocks situated in addresses almost contiguous in a first memory range dedicated to the memory allocation of object code packs of this storage field and to allocate to the data packs another set of elementary memory blocks in a second memory range dedicated to the memory allocation of data packs for this memory field. This enables avoidance of the breaking up of the first and second dedicated ranges, during successive installations/deinstallations of data structures.
[0017] The optimised management method for the storage dynamic allocation, the subject of this invention, applies to any onboard system, but more particularly to microprocessor or micro-controller cards with several applications.
[0018] The optimised management method for the memory dynamic allocation of an onboard system and the corresponding onboard system will be better understood when reading the description and the comments on the drawings hereafter, where, apart from FIG. 1 concerning an onboard system, such as a chip card in prior art:
[0019]
FIG. 2
a
shows a functional organisation chart illustrating the steps enabling the implementation of the optimised management for memory allocation of an onboard system, the subject of this invention, during the installation of an application;
[0020]
FIG. 2
b
shows, for illustration, an organisation chart representing the detail of process implementation steps for the memory allocation optimised management of an onboard system, the subject of this invention, during a deletion of an application;
[0021]
FIG. 2
c
shows, for illustration, a functional organisation chart of a particular operation mode that is not limited for the allocation of elementary memory blocks allowing the implementation of the management method for the memory allocation of an onboard system, the subject of this invention;
[0022]
FIGS. 3
a
and 3b show, for illustration, a preferred implementation mode that is not limited for the memory allocation implementation of an onboard system, the subject of this invention, in which a process of new allocation of already allocated elementary memory blocks is used;
[0023]
FIG. 4 shows, for illustration, an onboard system, such as a microprocessor or micro-controller card with several applications, having, stored in a non-volatile memory, data structures to which elementary memory blocks have been allocated, using the optimised management method implementation for memory allocation of an onboard system, the subject of this invention.
[0024] A more detailed description of the optimised management method for the dynamic storage allocation to a data structure, the subject of this invention, will now be given in connection with FIG. 2a and the following figures.
[0025]
FIG. 2
a
shows a functional organisation chart for the main steps, enabling the implementation of the optimised management method for dynamic memory allocation to a data structure in an onboard system, according to this invention, when installing an application, this functional organisation chart being related actually to a status diagram of the above mentioned main steps.
[0026] In particular, it is understood that the S step shown on FIG. 2a relates to a starting status in which a data structure, made by an application, by system data, or eventually by specific keys or digital values, should be stored, i.e. installed for applications for instance in the storage field of the onboard system for which the structure is that previously described in the description connected with FIG. 1.
[0027] In particular, it is understood that each data structure may be favourably identified by an identification number, marked ID_Aj, where j may have values between 1 and n, with n being the total number of data structures likely to be stored in the above mentioned memory space.
[0028] Further, for implementing the process subject of this invention, it is indicated that the memory space managed in an optimised manner according to it is divided into elementary memory blocks, each elementary memory block, marked BL1 with 1 possibly between 1=1 and 1=L, being made by a fixed number of bytes.
[0029] In a preferred non limited embodiment mode, it is indicated that the number of bytes making each BL1 block may be a power of 2, in order to facilitate the addressing of each elementary memory block as well as the addressing in each elementary memory block so defined.
[0030] In a mode of embodiment given as a non limiting example, it is indicated that each elementary memory block may include 256 bytes.
[0031] Finally, and within the implementation of the process subject of this invention, there is available at the S starting step an arbitrary digital value, marked AAAA, which may be used at an advantage in order to allow the implementation of a memory dynamic allocation process in elementary specific memory blocks, more especially adapted to the process implementation of optimised management for the dynamic memory allocation, the subject of this invention, as will be described later in the description.
[0032] In FIG. 2a, at the above mentioned starting S step, it should be noted:
[0033] [ID_Aj]j=1n the whole of identification numbers of data structures likely to be installed and managed according to the optimised management protocol for memory allocation, the subject of this invention;
[0034] [BL1]1=1L the whole of elementary memory blocks available further to a subdivision of the onboard system memory area as above mentioned;
[0035] QCOjp any object code pack relating to a data structure or identification number application ID_Aj during the installation procedure for the considered application;
[0036] QDjp Any data pack relating to the data structure or application of the same identification number ID_Aj during installation.
[0037] Generally, it is indicated that, during installation of a data structure or an application, the information packs are made of object code packs as mentioned above, representing this data structure, and of data packs relating to this data structure or the considered application.
[0038] This subdivision into information packs of the two above mentioned classes is the result of an actual discrimination of these information packs according to the installation step carried out. It is understood in particular that during installation of the object code representing the data structure or the application, the related information packs are known as such. The same applies to data packs relating to this data structure or application. Thus, the above mentioned subdivision is a result, basically, from the installation process for each application in the memory area of the related onboard system.
[0039] Due to the subdivision of the above mentioned memory area into elementary memory blocks that are addressable and the actual discrimination, and therefore the information packs subdivision into object code packs and into data packs related to this data structure, the optimised management method for dynamic memory allocation to a data structure, the subject of this invention, consists of an A1 step, as shown on FIG. 2a, to be allocated to object code packs QCOjp for the application or the related data structure, a set of elementary memory blocks, marked [BL1]1=1QC, these elementary memory blocks being situated at almost close-by addresses in a first memory range dedicated to the memory allocation of object code packs of the considered memory area.
[0040] In FIG. 2a, the allocation process, at the A1 step, to the object code packs is marked:
1
[0041] In the previous relation, it is indicated that MS1 designates the first memory range dedicated to the memory allocation of the above mentioned object code packs. Also, and in a non limiting manner, the whole of elementary memory blocks situated at almost neighbouring addresses in the first dedicated memory range is said to be defined by the starting address 1=1 and by the arrival address QC, with QC being actually the necessary memory range in the number of elementary memory blocks to ensure the storage of all the information packs of the object code QCOjp for the data structure or related application.
[0042] Also, the optimised management method for the dynamic allocation of memory to a data structure, the subject of this invention, consists of, in a A2 step, allocating to the data packs QDjp another set of elementary memory blocks, marked [BL1]LL-QD in a second memory range dedicated to the data pack memory allocation for the considered memory range.
[0043] In FIG. 2a, at step A2, the corresponding allocation operation is marked according to the formula:
[BL1]LL-QDεMS2
[0044] Regarding the whole of elementary memory blocks in the second memory range dedicated to the data pack memory allocation, the starting address is established in a non-limiting way on the value L-QD where QD is actually the memory range required to store the whole of data packs QDjp for the application or the corresponding data structure.
[0045] Regarding the starting and finishing addresses for the definition of elementary memory blocks sets above mentioned in step A1 or respectively A2, these data may be arbitrary, as long as there is no risk of recuperation regarding the above-mentioned sets.
[0046] Also, as shown in FIG. 2b, for a deletion operation E of code packs QCOj, or respectively the data packs QD1 above mentioned, the management method for allocating memory, the subject of this invention, may consist, as shown in the above mentioned figure, starting from a deletion step of an application ID_Ar, for deletion of object code packs QCOj of a step E1, of a deletion sub-step for blocks with index 1, this sub-step marked E11, being designated on FIG. 2b with the formula:
E11 ([BL1])εMS1 and [BL1]=ID—Ar then [BL1]AAAA.
[0047] With this deletion operation, it is understood that, for any block subject to deletion, block BL1 belonging to the storage area for object code packs MS1, the whole of these blocks corresponding to the application subject to deletion, and therefore to the referenced application ID_Ar, then each of the above mentioned blocks BL1 is allocated the specific AAAA reference previously mentioned in the description.
[0048] The sub-step 1 for deletion is then followed with a sub-step 2 of code relocation E12. This rearrangement by translation is made for 1o designating the first code block for the referenced application ID_Ar and 1max the last code block in this same application subject to deletion.
[0049] The relocation is then made on each block with an index lmax+j for which the reference number is different from AAAA, this operation being marked on FIG. 2b:
[BLl0+j]=[BLlmax+j]
[BLlmax+j]AAAA.
[0050] The previous relocation actually consists of achieving a translation for the blocks with an index 1max+j towards the blocks with an index 10+j followed by a deletion via an attribution of the identification value AAAA of the moved blocks.
[0051] Regarding the deletion of data packs QDj, a deletion step E2 is shown on FIG. 2b, this being marked, for any 1 index on blocks BL1, by
[BL1]εMS2 and [BL1]=ID—Ar
then [BL1]AAAA.
[0052] It is thus understood that in any BL1 block related to data packs QDj the identification value AAAA is then given as above mentioned in the description, which allows the deletion of data packs related to the above-mentioned block.
[0053] It is seen in particular that, for removing the data packs QDj, it is not necessary to relocate the removed blocks.
[0054] Regarding the optimised management method implementation for the memory dynamic allocation to a data structure or application, the subject of this invention, it is indicated that it is necessary to have available a management system for the above-mentioned memory area enabling to know which parts of it are free or used. Of course, such a system may consist of a system similar to that used for managing hard discs in microcomputers, this system being known under the name of File Allocation Table, or FAT.
[0055] Preferably, but without limits, the subdivision of the above-mentioned memory area into addressable blocks may be obtained in a particularly advantageous way using the implementation of a specific memory allocation process, which will now be described in a non limiting way in more details in connection with FIG. 2c.
[0056] As shown in FIG. 2c, it is indicated that the dynamic allocation process in elementary memory blocks to a data structure is implemented from at least one instruction of an elementary memory block allocation BL1, an allocation marked A, with which, in the above-mentioned memory block, is associated a reference to the identification number of the data structure or application considered, and from at least one deletion instruction for an elementary memory block, an instruction corresponding to the E operation shown in FIG. 2c.
[0057] In particular, the allocation A, to allocate an elementary memory block, consists of attributing to the identification number reference associated with the elementary memory block considered the value of the identification number ID_Aj.
[0058] Whereas in the memory allocation processes for previous onboard systems, the areas for storing data structures, such as applications, have a simple reference with the identification number of the corresponding data structure or application made in the form of a pointer, pointer for the beginning of data structure or application storage and pointer for the end of data structure or application considered storage, the allocation step A complying with the above mentioned allocation process consists of actually giving, as a reference for the identification number of the data structure or application, the value of the above mentioned identification number to each BL1 block where the digital information packs of the object code or data are stored. It is understood, in particular, as shown in FIG. 2c, that the attribution of the identification number value to the reference of the identification number consists of associating in a biunique manner the value of this identification number with the corresponding elementary memory block BL1, such operation being marked:
BL1(ID_Aj)
[0059] It is thus understood that the biunique above-mentioned putting into correspondence may be achieved by an association to each BL1 block of a data field representing the value of the above mentioned identification number ID_A1 in a management table of the memory dynamic allocation of the memory area for the above mentioned onboard system.
[0060] The complete structure of the above mentioned table will be given later in the description.
[0061] According to another noticeable feature in the above mentioned process of memory dynamic allocation in elementary memory blocks, one indicates, by referring to FIG. 2b, that the deletion step E consists, so as to remove an elementary memory block, of attributing to the reference to the identification number associated with the elementary memory block considered BL1 an arbitrary value instead of the identification number of the data structure or application considered. This arbitrary value is of course the value AAAA previously mentioned in the description. This arbitrary value is different from any value of identification number attributed to a considered data structure.
[0062] If referring to FIG. 2c, on sees:
[0063] [ID_Ar]r=1n the whole of identification numbers for data structures already installed;
[0064] ID_Ak the identification number of the data structure or application for which the memory allocation has to be executed, k ε [1,n];
[0065] Qk the necessary memory range for the digital information packs, object code packs or data packs to which a corresponding memory range should be allocated.
[0066] Also, a particular index r is defined, marked r0, with a 0 value.
[0067] In such conditions, the A allocation operation, as shown in FIG. 2c, may consist, so as to allocate a given elementary memory block, marked BL1, to the digital information pack Qk previously mentioned, and prior to any step consisting of attributing to the identification number reference the identification number value, to check, for any elementary memory block already allocated, the identity of the reference to the identification number and of the identification number of the related data structure, in one step AA1. Such identity checking consists of executing a test consisting of looking for the first memory block BL1 for which the associated identification number ID_Ar corresponds to the identification number ID_A of the data structure or application for which the allocation has to be made.
[0068] The above mentioned test is marked:
∃BLl(ID_Ar) with ID_Ar=ID_Ak ? and r>r0
[0069] If there is a negative reply to the test AA1, consisting of looking for the next block belonging to the application for which the identification number is ID Ak, an instruction to allocate a block of free elementary memory block is called at the step AA3, none of the possible memory blocks already allocated to the application for which the identification number is ID_Ak having any free range sufficient to contain the information pack Qk.
[0070] In FIG. 2c, the call for instruction of the next elementary memory block allocation is marked:
BL
a
(AAAA)=BLa(ID—Ak).
[0071] The allocation instruction above mentioned of the next elementary block thus enables the allocation of an elementary memory block of address a, a being any offset value, da ε N, whole of the natural integral numbers. The elementary memory block taken is of course an elementary block to which has been previously attributed the arbitrary value AAAA and it so corresponds to a removed block, i.e. a free block ready for any allocation and storage of the corresponding information pack Qk.
[0072] The positive response to the AA1, test shows that the elementary memory block just found is at least partially allocated to the data structure or application for which the allocation has to be made.
[0073] If there is a positive response to the AA1, previously mentioned test, the allocation process consists then of checking, with a test AA2, the existence of a sufficient memory range remaining in the current elementary memory block BL1(ID_Aj) previously mentioned to save the digital information Qk previously mentioned.
[0074] In FIG. 2c, the checking of the existence of a sufficient memory range in the test AA2 includes the putting to the r value of the particular index r0 and is marked:
LR
r
=LB
r
−LO
r
and Qk ≦LRr ?
[0075] a formula in which LRr designates the remaining memory range for the current elementary memory block, LBr designates the total memory range for each current elementary block, i.e. 256 bytes in the previously mentioned embodiment mode, and LOr is the memory range occupied in the current previously mentioned elementary memory block.
[0076] If there is a positive response to the checking test AA2, the information pack Qk requiring a memory range smaller than the memory range of the current elementary memory block, to the information pack Qk may be allocated in a step AA4, the previously mentioned current elementary memory range BL1(ID_Ar), with the digital information pack Qk being possibly saved in the free memory area of the current previously mentioned elementary memory block
[0077] Thus, the allocation step AA4 consists of a writing of the information pack Qk in the block BL1(ID_Ar) and an updating of the value of memory range occupied in the block, marked:
LO
r
=LO
r
+Q
k
.
[0078] If there is a negative response to the checking test AA2, the current block BL(ID_Aj0) having too little free range to contain the information pack Qk, it is necessary to return to step AA1, in order to look for another block with an identification number as ID_Ak not having yet been analysed during this allocation.
[0079] Of course, the allocation steps themselves AA3 and AA4 are followed by a return to the starting status S.
[0080] In a preferred implementation without limits, it is indicated that, further to allocation steps AA3 and AA4, and therefore further to allocation of an elementary memory block to an application and of course to the saving by writing the digital information, i.e. the information pack Qk by writing this information in the elementary memory block allocated, the allocation process according to the subject of this invention may also consist of calculating, in a step AA5 a checksum of the allocated elementary memory block, this operation being designated by calculation CKS in FIG. 2c.
[0081] Generally, it is indicated that, for implementing the step AA5, calculating the checksum may be made using calculation means of a classical checking value, these calculation means being also able to correspond to the specialised calculation circuit 20 contained in the onboard systems of the classical type, as described previously in the description.
[0082] The step A55 may enable calling a step AA6 of classical type error management enabling to point out a problem of data integrity or saved code, allowing to provide a blockage of the onboard system.
[0083] The memory dynamic allocation process previously described in connection with FIG. 2c may be implemented in a preferred manner in order to proceed with the allocation steps A1 and/or A2 in FIGS. 2a or 2b.
[0084] By implementing the optimised management method of the dynamic memory allocation to a data structure or application, according to the subject of this invention, such as previously described, in relation with FIG. 2a and eventually 2c, it is indicated that the fact of storing object code packs and data packs relating to an application or a structure of data, at different places enables to avoid breaking up of the memory area when installing applications. This is because, during the installation itself, there is no really breaking up or fragmentation phenomenon for code data packs, since the corresponding code packs are stored and saved in consecutive large blocks, and this in a single time during installation.
[0085] Regarding the risk of breaking up or fragmentation of data packs, since a data structure, such as an application can create data relating to this application or this data structure at any time and much more frequently, this is however much easier to control since the data blocks don't have to be stored consecutively. It is therefore very easy to use again a free elementary memory block by saving in it data packs relating to an application. The separation of data packs from code packs therefore solves properly the problem of breaking up or fragmentation.
[0086] However there are still holes, i.e. risks of elementary memory blocks that are not occupied in the first memory range dedicated to the allocation of object code pack memory in the considered memory area. This risk occurs when removing an application for instance.
[0087] To eliminate completely such risk, the optimised management method of the dynamic memory allocation to a data structure, as per the subject of this invention, also implement a defragmenting process, which will be described in relation with FIGS. 3a et 3b.
[0088] It is understood that further to deinstalling an application, such deinstalling is shown with a deletion of elementary memory blocks allocated to this application deinstalled in the first memory range dedicated to the object code packs memory allocation.
[0089] In FIG. 3a, there are various applications, successively called Applet 1, Applet 2, Applet 3 and Applet 4.
[0090] The various applications in the given example correspond to digital values as hereafter:
1|
|
Applet 1 150 bytes of code, i.e. 1 block
600 bytes de data, i.e. 3 blocks
Applet 2 150 bytes of code, i.e. 1 block
150 bytes of data, i.e. 1 block
Applet 31100 bytes of code, i.e. 5 blocks
200 bytes of data, i.e. 1 block
Applet 4 400 bytes of code, i.e. 2 blocks
300 bytes of data, i.e. 2 blocks
|
[0091] The successive installation/deinstalling steps of the above applications are shown in FIG. 3b and are as follows:
[0092] Step 1
[0093] Installation of Applet 1 and installation of Applet 2.
[0094] Step 2
[0095] Deletion of Applet 1 and reallocation of object code packs remaining not deinstalled.
[0096] Step 3
[0097] Installation of Applet 3.
[0098] Step 4
[0099] Installation of Applet 4.
[0100] In FIG. 3b, the memory range that can be used is said to be subdivided into a set of elementary memory blocks, with an address between 1 and L, of starting address, and respectively ending.
[0101] References 1c, 2c, 3c and 4c designate the elementary memory blocks allocated to object code packs for applications Applet 1, Applet 2, Applet 3 and Applet 4 respectively and the elementary memory blocks 1d, 2d, 3d and 4d designate the elementary memory blocks allocated to data packs relating to these applications.
[0102] The reallocation to the remaining object code pack, i.e. the pack 2c further to deletion of application Applet 1 at step 2, with the Applet 2 application not being deinstalled, consists in fact of reallocating by rearranging the elementary memory blocks allocated to the remaining object code pack previously mentioned. Thus, the rearranging of the elementary memory block occupied by the object code 2c in FIG. 3b is shown by the relocation T of this for passing to the elementary memory block with a starting address 1 at the end of step 2.
[0103] Thus, the above mentioned reallocating by rearranging, in particular by translation, allows for the rearranging of any set of elementary memory blocks that is situated at addresses almost close by to fill in the elementary memory blocks removed, previously allocated to the deinstalled application.
[0104] Generally speaking, as shown in FIG. 3b, the memory area of the onboard system, a non volatile programmable memory area, is preferably addressed according to a linear address field with a starting address and a memory area end address, such addresses being each a limit address. These addresses are marked 1 and L in FIG. 3b.
[0105] In such conditions, the definition of the dedicated first and respectively second memory range and the allocation of data packs may be made from one or the other limit addresses, or vice-versa. It is of course understood that the selection of the starting 1 address, respectively of the end L address to ensure the allocation of elementary memory blocks to the object code packs has no effect on the implementation of the process, the subject of this invention.
[0106] It is also understood that, depending on the number of applications installed, the clear definition of the first and second memory ranges dedicated to allocating object code memory packs or data packs is not necessary.
[0107] In particular, this operating mode allows the optimisation of the above mentioned memory area occupation if there is no clear definition of the dedicated first and second memory ranges.
[0108] In order to ensure a specially easy reallocation process of elementary memory blocks, it is indicated that the addressing of elementary memory blocks content, for allocation, reallocation and addressing for defining the first and second memory ranges, is a relative addressing. In such conditions, the relative addressing, in each elementary memory clock, allows easily to rearrange the above mentioned blocks by relocating a desired number of elementary memory blocks freed further to declaring the previous and/or subsequent elementary blocks as free or removed blocks.
[0109] The allocation of elementary memory blocks starting from limit addresses, as previously mentioned in the description, allows the use of free memory area in the best way if there is no fixing regarding the size of code and data relating to applications. The only constraint to comply with is the absence of cover of the first, respectively second dedicated memory range.
[0110] A more detailed description of an onboard system with several applications especially adapted to implementing the optimised management method for memory allocation to a data structure, as per the subject of this invention, will now be given in connection with FIG. 4.
[0111] Generally speaking, it is recalled that the above mentioned onboard system has an operating system ensuring the management of input/output circuits of the random access memory and non-volatile programmable memory for this operating system through the microprocessor.
[0112] As shown on the above mentioned FIG. 4, the onboard system includes, in the non-volatile programmable memory area 18a, a management table, marked TG, and an allocation table for the memory area in elementary memory blocks.
[0113] As mentioned previously, this management table TG may be a file of the FAT type, or, on the contrary, as shown on FIG. 4 in a non limiting way, a table having for each application or data structure, an identification number ID_Ak, the value of the occupied memory space marked LIk for the corresponding elementary memory block and the checking values CKS1a and CKS1b for the previously mentioned elementary memory block.
[0114] In FIG. 4, there are shown only the data fields that correspond for k=1 and k=2, i.e. for blocks related to two different applications.
[0115] In particular, the above-mentioned management table TG allows to ensure the allocation process such as shown in FIG. 2c and also of course the optimised management method for the dynamic allocation of memory as per the subject of this invention.
[0116] In such conditions, the programmable non-volatile memory 18a may include, as an example, the elementary memory blocks allocated to object code, respectively to data packs, according to the arrangement shown in FIG. 4 for applications Applet 3, Applet 2 and Applet 4 previously mentioned in the description further to executing step 4 of FIG. 3b.
[0117] In such conditions, the non-volatile programmable memory 18a includes object code packs covering a set of applications, these object code packs being saved in a set of elementary memory blocks situated at addresses very close to the first memory range P1 as well as data packs related to each application, such data packs being saved in another set of elementary memory blocks in a second memory range P2 dedicated to data packs memory allocation.
[0118] Referring to FIG. 4, it is also noted that, for a non-volatile programmable memory area addressed according to a linear addresses field comprising a starting address 1 and an ending address L, which in fact make up the limit addresses as above-mentioned, the definition of the first MS1 and the second MS2 ranges of dedicated memory is then made starting from the above mentioned limit addresses, the first and second dedicated memory ranges MS1, MS2 being then defined according to a first and second separate elementary memory block sets, the memory area being so optimised regarding its occupation.
Claims
- 1. Optimised management method for dynamic memory allocation to one data structure, saved in the form of digital information packs in the memory area of an onboard system, characterised in that said information packs are made of object code packs, representing this data structure, and of data packs relating to this data structure and said memory area is subdivided in addressable elementary memory blocks, this method consisting of allocating a set of elementary memory blocks to said code and data packs and for a deletion operation, of rearranging, only for code packs, the allocated elementary blocks.
- 2. Method according to claim 1, characterised in that, for a deletion operation, the rearrangement of blocks consists of reallocating by translation to said remaining object code packs, a set of elementary memory blocks to fill in the deleted elementary memory blocks.
- 3. Method according to one of the claims 1 or 2, characterised in that it consists of:
allocating to said object code packs a set of elementary memory blocks situated at addresses mainly closed in a first memory range dedicated to allocating a memory of object code packs of said memory area; allocating to said data packs another set of elementary memory packs in a second memory range dedicated to allocating a memory of data packs of the said memory area.
- 4. Method according to claim 3, characterised in that, for a memory area addressed according to a linear address field having a starting address and an ending address for the memory area each constituting a limit address, the definition of the dedicated first, respectively second memory range and the allocation of object code packs, respectively of data packs are executed starting from one or respectively the other limit address, or vice-versa, which allows optimising the occupation of said memory area.
- 5. Method according to one of the claims 1 to 4, characterised in that the content addressing for said elementary memory blocks for allocation and re-allocation operations intended at least for object code packs and addressing to define the first and the second memory range is a relative addressing.
- 6. Onboard system with several applications comprising an operating system ensuring the management of the random access memory and the programmable non-volatile memory of this operating system through a microprocessor, characterised in that it includes stored in the programmable non-volatile memory area:
packs of object code, representing a set of applications, these packs of object code being saved in a set of localised elementary memory blocks, using a rearrangement method of the elementary blocks only allocated for the code packs, at addresses mainly contiguous in a first memory range, dedicated to the memory allocation to object code packs of said non-volatile programmable memory area; packs of data relating to each application, these data packs being saved in another set of elementary memory blocks in a second memory range, dedicated to allocating memory to data packs, from said programmable non-volatile memory area.
- 7. System according to claim 6, characterised in that, for a programmable non volatile memory area addressed according to a linear address field comprising a programmable non volatile memory area starting address and an ending address, being each a limit address, the definition of the dedicated first and respectively the second memory range is made starting from one, or respectively the other limit addresses, or vice-versa, which enables a definition of the dedicated first and respectively the second memory range according to a first and second separate set of elementary memory blocks and to optimise the occupation of said programmable non volatile memory area.
Priority Claims (1)
Number |
Date |
Country |
Kind |
00/16725 |
Dec 2000 |
FR |
|
PCT Information
Filing Document |
Filing Date |
Country |
Kind |
PCT/FR01/04122 |
12/20/2001 |
WO |
|