CN1321377C - Method for controlling smart card storage environment - Google Patents

Method for controlling smart card storage environment Download PDF

Info

Publication number
CN1321377C
CN1321377C CNB2005100771594A CN200510077159A CN1321377C CN 1321377 C CN1321377 C CN 1321377C CN B2005100771594 A CNB2005100771594 A CN B2005100771594A CN 200510077159 A CN200510077159 A CN 200510077159A CN 1321377 C CN1321377 C CN 1321377C
Authority
CN
China
Prior art keywords
space
storage
smart card
piece
temporary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100771594A
Other languages
Chinese (zh)
Other versions
CN1687904A (en
Inventor
吴鑫山
杨东凯
姚黎明
张其善
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Beijing University of Aeronautics and Astronautics
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CNB2005100771594A priority Critical patent/CN1321377C/en
Publication of CN1687904A publication Critical patent/CN1687904A/en
Application granted granted Critical
Publication of CN1321377C publication Critical patent/CN1321377C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a method for controlling smart card storage environment. The smart card storage environment is composed of a CPU, an RAM, an ROM, an EEPROM, a logic operation module, an enciphering engine module, an interrupt processing module, a, CRC generator, a random number generator, a timer and an external interface, wherein the RAM is used for storing temporary data information, the ROM and the EEPROM are used for storing permanent data information, data information inputted from outside is classified by storage classes in a smart card at first, and then the different storage classes are used for controlling storage rules and storing the storage rules in the smart card. The present invention can effectively save limited computing resources and storage resources of a smart card platform, improve the adaptability when space is allocated and reclaimed, provide a permanent space memory management policy and a sectional type temporary space memory management policy of a doubly linked list structure under multiple utility operating environment and design and realize corresponding storage allocation and file reclamation.

Description

The control method of smart card storage environment
Technical field
The present invention relates to a kind of method that smart card storage environment is controlled, specifically, be meant a kind of control method of storage environment management system of Java smart card.
Background technology
The Java smart card techniques is the transplanting of Java Virtual Machine technology to the limited resources equipment platform.The Applet of Java smart card generates the bytecode program of virtual machine instructions collection through compiling and conversion back.These bytecodes are gone up virtual machine by card again and are moved.The early stage running technology of Java Virtual Machine mainly is to explain execution mechanism, and being about to bytecode is that corresponding local run time version moves by interpretive program translation, and it is suitable for using in the resource less equipment.Then, in order to improve the execution speed of bytecode, local code execution, on-the-flier compiler and running technologies such as jit compiling execution, HotSpot technology and the execution of direct specialized hardware structure have been proposed to be compiled as again in succession.Improved speed significantly though be compiled as the method for local code, influenced the security mechanism and the portability of Java language to a certain extent, this in the application of IC cards that high security requires obviously and be not suitable for.On-the-flier compiler, jit compiling technology and HotSpot technology are when operation bytecode to be compiled as local code, the storage resources when this needs a large amount of operations, and this is not feasible in the smart card that has only 2K left and right sides RAM usually yet.
The smart card hardware structure of the employing special use that also has is at present moved bytecode with raising speed, and this performance gain that brings is very significant, but has also improved the cost of card simultaneously exponentially.Special-purpose hardware configuration also has certain limitation, as the expansion of pseudoinstruction, and does not have the CPU of a large amount of Java application specific architectures at present in intelligent card chip and other limited resources apparatus field.
The automatic garbage reclamation mechanism of memory headroom is big characteristics of Java language, also is the assurance of Java language security.But because slower writing rate of EEPROM and limited read-write number of times, this makes the realization of garbage reclamation in Java card must be different from the PC platform.At existing document aspect the storage administration just on the basis of Java Card 2.1 standards, under the environment of single Applet example operation for the temporary space Study on Management.
Summary of the invention
The management method that the purpose of this invention is to provide a kind of smart card storage environment, this management method can be saved limited computational resource of smart card platform and storage resources effectively, the adaptivity when strengthening allocation of space and reclaiming operation.The present invention proposes the memory management policy of the temporary space of the memory management policy in the lasting space of doubly linked list structure under many application runtime environments and sectional type, designed and Implemented storage allocation and rubbish recycling management.
The control method of a kind of smart card storage environment of the present invention, described smart card is made of CPU, RAM storer, ROM storer, eeprom memory, logical operation module, crypto engine module, interruption processing module, CRC generator, randomizer, timer and external interface, described RAM storer is used to store ephemeral data information, described ROM storer and eeprom memory are used to store persistant data information, and the data information memory step that the outside is imported has:
(A) data message to described outside input carries out the storage class classification, obtains storage class,
Described storage class has first storage class, is used to realize the storage administration in lasting space; With
Second storage class is used to realize the storage administration of the temporary space of CLEAR_ON_RESET attribute; With
The 3rd storage class is used to realize the storage administration of the temporary space of CLEAR_ON_DESELECT attribute;
(B) the described storage class after handling through (A) storage classification is stored control according to storage rule, its first storage class is stored in the eeprom memory; Second storage class and the 3rd storage class are stored in the RAM storer,
Described storage rule has first storage rule, is used for described first storage class is stored and reclaimed according to the doubly linked list structure, and adaptive method is first adopted in storage, reclaims and adopts the space act of union; Second storage rule is used for described second storage class is begun to store to low address according to the high address end from temporary space, reclaims and adopts the object tag absorption method; The 3rd storage rule is used for described the 3rd storage class is begun to store to high address according to the low address end from temporary space, reclaims and adopts the object tag absorption method.
Advantage of the present invention: the advantage of (one) doubly linked list structure is by adjusting concatenation pointer, can be easy to insert or delete a record, having saved limited computational resource and the storage resources of smart card platform.Make easily simultaneously and detect pointer and move, therefore be easy to carry out instance object or the application programs storage space distributes or deletion action to forerunner and rear-guard direction.(2) sectional type temporary space storage administration mechanism has effectively been avoided the address conflict problem in traditional control method, has stronger adaptivity during operation, is very suitable for the running environment of smart card.
Description of drawings
Fig. 1 is the inner structure synoptic diagram of smart card.
Fig. 2 is the storage allocation process flow diagram in the lasting space of the present invention.
Fig. 3 is the rubbish recycling management process flow diagram in the lasting space of the present invention.
Fig. 4 is the sectional type temporary space storage allocation of the present invention when moving.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
The present invention is a kind of control method of smart card storage environment, smart card is made of CPU, RAM storer, ROM storer, eeprom memory, logical operation module, crypto engine module, interruption processing module, CRC generator, randomizer, timer and external interface, described RAM storer is used to store ephemeral data information, described ROM storer and eeprom memory are used to store persistant data information, and the data information memory step that the outside is imported has:
(A) data message to described outside input carries out the storage class classification, obtains storage class,
Described storage class has first storage class, is used to realize the storage administration in lasting space; With
Second storage class is used to realize the storage administration of the temporary space of CLEAR_ON_RESET attribute; With
The 3rd storage class is used to realize the storage administration of the temporary space of CLEAR_ON_DESELECT attribute;
(B) the described storage class after handling through (A) storage classification is stored control according to storage rule, its first storage class is stored in the eeprom memory; Second storage class and the 3rd storage class are stored in the RAM storer,
Described storage rule has first storage rule, is used for described first storage class is stored and reclaimed according to the doubly linked list structure, and adaptive method is first adopted in storage, reclaims and adopts the space act of union; Second storage rule is used for described second storage class is begun to store to low address according to the high address end from temporary space, reclaims and adopts the object tag absorption method; The 3rd storage rule is used for described the 3rd storage class is begun to store to high address according to the low address end from temporary space, reclaims and adopts the object tag absorption method.
In the present invention, adopt the lasting space storage administration mechanism of doubly linked list structure, its doubly linked list is as shown in the table,
The doubly linked list structure
HEADER Llink(2Byte) Tag(1Byte) Size(2Byte) Rlink(2Byte)
DATA
FOOTER Uplink(2Byte) Tag(1Byte)
In the table, the HEADER item is the head of this structure, comprises following four territory: Llink: point to the pointer of its left sibling, take 2 bytes of memory spaces.Tag: take mark.When tag was 1, this piece was for taking piece; Tag is 0 o'clock, and this piece is a free block.Size: the size of expression whole node comprises HEADER and FOOTER.Rlink: the pointer that points to its right node.
The DATA item is the continuous storage unit of a group address, is to distribute to the region of memory that the user uses.
The FOOTER item is the tail of this structure, comprises following two territory: Uplink: point to the pointer that this section is nodded, its value is the first address of present node.Tag: busy flag, with the Tag territory among the HEADER.
Divide timing at the storage request object, adopt adaptive method first.Its working method is: (point to a free block at head pointer, free block begins to search for backward to divide timing to incite somebody to action from then at object, therefore this free block can be seen the head of idle chained list as) search the enough big space piece that first meets the demands in the idle chained list pointed, if this free block size is identical with want object for allocation size, then this free block is distributed to this object; Otherwise it is divided into two parts, a part is distributed to object, another part is untapped memory block, it is inserted in the free list as a new free block, revise head pointer simultaneously, make it to point to next free block of the free block that finds just now, so that the place search that finished since last time when seeking the free area next time, rather than all start anew at every turn.Consider simultaneously when free space during only than the big several byte in request space, cut apart this free block this moment again, the free block that will occur a large amount of several bytes in the then idle chained list, and this free block will seldom can be reallocated, and has increased the external fragmentation of memory block, has reduced the utilization factor of memory block simultaneously, therefore here we set a difference thresholding, be 10 bytes,, this free block cut apart when the difference in free space and request space during greater than 10 bytes; Otherwise directly this free block is distributed to object, cut apart and no longer do.The flow process of allocation algorithm is described as shown in Figure 2.
The storage space that will reclaim that storage is recovered as providing the storage first address reclaims, and can divide following four kinds of situations:
1) given left piece is free block, then with this given and the merging of left piece, substitutes left piece as a free block and is inserted in the free block formation.
2) given right piece is free block, then this given merged mutually with right piece, substitutes right piece as a free block and is inserted in the free block formation.
3) given left piece and right piece are free block, then this piece are merged mutually with left piece, right piece, substitute left piece and are inserted in the free block formation, simultaneously the right piece of deletion in the free block formation.
4) left piece and right piece are and take piece, and the busy flag of then revising this piece is inserted in the free block formation for idle.
With reclaiming piece and after adjacent free block merges mutually, revising the head pointer of idle chained list, make it to point to the free block of firm merging, when then reallocating, from then on reclaim piece and rise backward and search between the free area.Its process flow diagram as shown in Figure 3.
Under many Applet running environment based on the sectional type temporary space storage administration mechanism of context and event attribute
Traditional storage allocation method shared scheme for the CLEAR_ON_DESELECT storage space under many Applet running environment will inevitably produce the address conflict problem, simultaneously because static allocation CLEAR_ON_RESET space, when the last mounted Applet of card had used up existing CLEAR_ON_RESET space, follow-up Applet can't download and install on the card again.
For addressing the above problem, the present invention is root node of each section establishment and the array handle formation of pointing to the corresponding event attribute in same memory paragraph and in the persistent storage space with the interim array organization that same context has in the similar events as attribute.In fact there are the formation of two array handles, CLEAR_ON_RESET and the formation of CLEAR_ON_DESELECT event attribute in each context.When operation a context also corresponding corresponding two interim memory paragraphs.
The present invention is corresponding segment base register for each memory paragraph is provided with, the val_address element memory address section of the being bias internal amount in the array handle, and the actual physical address adds side-play amount by plot and obtains.In addition, CLEAR_ON_RESET and CLEAR_ON_DESELECT memory paragraph distribute (high address end and low address end) respectively from the two ends of temporary space, wherein the direction of growth of CLEAR_ON_RESET section is to low address by high address, and the direction of growth of CLEAR_ON_DESELECT section be by low address to high address, thereby avoid the overlapping covering of the two address space.
If the array length that current request is distributed is length, array type is type, and the root node of the array handle formation of corresponding event attribute is root, and the process prescription of then creating new interim array object is as follows:
Array_Handle *AllocateTransientObject()
{
pre_p=p=root;
while(p<>null)
{
if((p->ref_tag==0)&&(p->length==length)&&
(p->item_type==type))
{
// reuse existing unreferenced object space
return p;
}
else
{
pre_p=p;
p=p->next;
}
}
pre_p->next=new(Array_Handle);
pre_p->next->val_address=AllocateMemoryBlock(pre_p);
return pre->next;
}
New () function wherein is used for distributing the Array_Handle structure and returning first address in lasting space, AllocateMemoryBlock () function is used to distribute interim storage space, suction parameter pointer p is the tail of the queue pointer of current queue, and function definition is as follows:
u2 AllocateMemoryBlock(Array_handle *p)
{
If (enough available temporary spaces are arranged)
{
address=p->val_address+p->length;
return address;
}
else
{
Call temporary space garbage reclamation process;
If (enough available temporary spaces are arranged)
{
address=p->val_address+p->length;
return address;
}
else
{
The temporary space internal memory overflow exception of dishing out;
}
}
}
After belonging to a certain contextual Applet and successfully being selected, interim storage space management process can come two event attribute memory paragraphs in the context for this reason to determine the value of segment base register and travel through the temporary object formation to carry out allocation of space and initialization according to current internal memory operating position, the temporary object of Applet distributes when considering operation simultaneously, has all distributed certain headspace according to current free space situation in each memory paragraph.In order to store these information relevant with memory paragraph, system's section for each distribution when operation is safeguarded a segment descriptor (mostly being 8 most) data structure in RAM, and it is defined as follows:
Segment_Descriptor
{
U2 Base/segment base register
U1 event_type // event attribute RESET or DESELECT
U2 Length // segment length
U2 Reserve_length // headspace length
U1 context // object context
U1 Non_ref_length // unreferenced space length
}
Temporary space distribution condition during the operation of many Applet example as shown in Figure 4.
The process prescription of system assignment temporary space memory paragraph is as follows after a certain context context starts:
void AllocateSegment(ulcontext)
{
S points to first segment descriptor in the segment descriptor table;
while(s<>null)
{
The if ((﹠amp of s->context==0); ﹠amp; (s->Length>request length))
{
s->context=context;
S->Reserve_length is set;
S->Non_ref_length is set;
S->event_type is set;
return;
}
S points to next segment descriptor;
}
With the memory paragraph is that unit carries out storage compacting;
If (no enough available interim storage spaces)
{
The temporary space internal memory overflow exception of dishing out;
}
else
{
// corresponding segment descriptor is set
s->context=context;
S->Length is set;
S->Reserve_length is set;
S->Non_ref_length is set;
S->event_type is set;
return;
}
}
Rubbish recycling management
More existing rubbish recycling management mechanism can not be applicable to the smart card environment that resource is very limited fully at present, so we are providing the object tag absorption method of interim storage space on the card under the situation of taking all factors into consideration response speed and limited resources.
The temporary object of system's initial creation all is marked as unreferenced.Can not be recovered for the object of being quoted by variable in the persistent system.Therefore in the design of bytecode interpreter, all the type of the object that is cited is judged and the mark temporary object for all instructions that referring domain is carried out assignment.If p is a pointer to object, then labeling process is as follows:
The assignment labeling process of lasting reference to variable is as follows:
If (p->tag==00) // temporary object
P->ref_tag=02; // quote lastingly
The assignment labeling process of local reference to variable is as follows:
If ((p->tag==00) // temporary object
﹠amp; ﹠amp; (p->ref_tag==00)) // be not cited
P->ref_tag=01; // local variable is quoted
Because the limited resources on the card and the requirement of real-time response characteristic, it is infeasible therefore carrying out accurate garbage reclamation according to the local variable in the Java stack on card.After so select (), process (), deselect () method that we are chosen in Applet with the gauge point of garbage reclamation are returned.The Java stack of this moment is empty, so only the object of being quoted by local variable all should be recovered.Therefore the object in gauge point place mark root formation pointed again is s as if corresponding segment descriptor pointer, and labeling process is as follows:
p=root;
while(p<>null)
{
if(p->ref_tag==01)
{
// local variable is quoted, and is labeled as unreferenced and is added in the unreferenced space of segment descriptor
p->ref_tag=00;
s->Non_ref_length+=p->length;
}
else
{
p=p->next;
}
}
Because Applet can not be modified after downloading on the smart card and can repeatedly rerun, therefore it is very high to quote probability for the repeatedly operation of same temporary object, thus the temporary object of quoting for local variable we in labeling process, it is not deleted from formation.This section ram space is reserved out when this context reruns like this, is beneficial to reusing of temporary object.
When not having available temporary space when Applet request distribution temporary object, system can start the garbage reclamation process.The strategy step of garbage reclamation is as follows:
1) in order to satisfy the real-time response characteristic, taked the strategy of increment type garbage reclamation, when can providing, finishes required storage space removal process.
2) has under the higher prerequisite of reusing rate the memory paragraph of the preferential current off-duty context correspondence of garbage reclamation at the temporary object of hypothesis in the current operation context.
3) storage space of priority reclamation reservation.
4) the adjacent memory paragraph of the preferential current operation context of garbage reclamation memory paragraph is to reduce the data amount of movement.
5), then the unreferenced object space of reserving in the off-duty context memory paragraph is carried out storage compacting and reclaim if aforesaid operations still can not provide required storage space after finishing.
6) carry out storage compacting and reclaim moving the unreferenced object space of reserving in the contextual memory paragraph at last.
The garbage reclamation process prescription of temporary object is as follows:
void GarbageCollection()
{
Reserve_length according to off-duty context memory paragraph in the segment descriptor table judges whether headspace satisfies the demands;
If (headspace satisfies the demands)
{
Reclaim the headspace in the off-duty context memory paragraph;
Move corresponding memory paragraph and change the segment base register;
return;
}
Non_ref_length according to off-duty context memory paragraph in the segment descriptor table judges whether unreferenced space satisfies the demands;
If (unreferenced space satisfies the demands)
{
The unreferenced object space of reserving in the off-duty context memory paragraph is carried out storage compacting and returns
Receive;
Move corresponding memory paragraph and change the segment base register;
return;
}
Non_ref_length according to all context memory paragraphs of segment descriptor table judges whether unreferenced space satisfies the demands;
If (unreferenced space satisfies the demands)
{
The unreferenced object space of reserving in the corresponding context memory paragraph is carried out storage compacting and returns
Receive;
return;
}
If (said two devices and satisfy the demands)
{
Then carry out above-mentioned removal process respectively;
return;
}
}
If p, pre_p be array handle pointer, root is the formation root node, and s is the segment descriptor pointer, and it is as follows then to carry out the process prescription of storage compacting for the unreferenced object space of reserving:
void NonRefContraction()
{
pre_p=p=root;
while(p<>null)
{
if(p->ref_tag==00)
{
// unreferenced object
s->Non_ref_length-=p->length;
For (; The follow-up reference object node of p in the formation; )
{
val_address-=p->length;
}
p=p->next;
dispose(pre_p->next);
pre_p->next=p;
}
else
{
pre_p=p;
p=p->next;
}
}
}
When current context environment out of service, its pairing temporary space should promptly be reclaimed whole memory paragraphs of this context correspondence by system recoveries all over, if current context is Current_context, s is the segment descriptor pointer, and removal process is described below:
While (section of Current_context correspondence has not reclaimed)
{
if(s->context==Current_context)
{
On behalf of the present segment descriptor, //context 0 do not use
s->context=0;
}
S points to next segment descriptor;
}
In sum, the invention provides a kind of management method of smart card storage environment, adopt the doubly linked list structure to carry out lasting space management in this management method, can relatively easily insert or delete a record, make easily simultaneously and detect pointer and move, therefore be easy to carry out instance object or the application programs storage space distributes or deletion action to forerunner and rear-guard direction.Save limited computational resource of smart card platform and storage resources effectively.In this management method temporary space is adopted segmented storage management mechanism, effectively avoided the address conflict problem in traditional control method, the adaptivity when strengthening allocation of space and reclaiming operation is very suitable for the running environment of smart card.

Claims (9)

1. the control method of a smart card storage environment, described smart card is made of CPU, RAM storer, ROM storer, eeprom memory, logical operation module, crypto engine module, interruption processing module, CRC generator, randomizer, timer and external interface, described RAM storer is used to store ephemeral data information, described ROM storer and eeprom memory are used to store persistant data information, and it is characterized in that has the data information memory step of outside input:
(A) data message to described outside input carries out the storage class classification, obtains storage class,
Described storage class has first storage class, is used to realize the storage administration in lasting space; With
Second storage class is used to realize the storage administration of the temporary space of CLEAR_ON_RESET attribute; With
The 3rd storage class is used to realize the storage administration of the temporary space of CLEAR_ON_DESELECT attribute;
(B) the described storage class after handling through (A) storage classification is stored control according to storage rule, its first storage class is stored in the eeprom memory; Second storage class and the 3rd storage class are stored in the RAM storer,
Described storage rule has first storage rule, is used for described first storage class is stored and reclaimed according to the doubly linked list structure, and adaptive method is first adopted in storage, reclaims and adopts the space act of union; Second storage rule is used for described second storage class is begun to store to low address according to the high address end from temporary space, reclaims and adopts the object tag absorption method; The 3rd storage rule is used for described the 3rd storage class is begun to store to high address according to the low address end from temporary space, reclaims and adopts the object tag absorption method.
2. the control method of smart card storage environment according to claim 1, it is characterized in that: the adaptive method first that first storage rule in the storage rule carries out the doubly linked list storage organization to described first storage class is, searches the free block M that satisfies free block size size 〉=n by the data message amount n of input in head pointer pav idle chained list pointed; When free block size size-n≤10 bytes, directly this free block is distributed to the data message of input; When free block size size-n>10 bytes, M is divided into two parts with free block, and the memory allocation that wherein is equal to the data message amount n of input is given the data message of input; Remainder is inserted in the idle chained list as free block; Turn back to allocation pointer after the data message amount n of described input assigned, and to revise head pointer pav be next free block of free block M, finish the adaptive first of first storage class; Output error message and finish the adaptive first of first storage class when free blocks all in the idle chained list is not satisfied size 〉=n.
3. the control method of smart card storage environment according to claim 1, it is characterized in that: the space act of union that first storage rule in the storage rule carries out the employing of doubly linked list recovery structure to described first storage class is, to reclaiming the idle determination that space piece H carries out adjacent block, as left space piece H LDuring for the free time, then will reclaim space piece H and left space piece H LMerge, substitute left space piece H with the space piece after the described merging LPosition in idle chained list, and revise the head pointer pav of idle chained list, make the space piece after head pointer pav points to described merging; As right space piece H RDuring for the free time, then will reclaim space piece H and right space piece H RMerge, substitute right space piece H with the space piece after the described merging RPosition in idle chained list, and revise the head pointer pav of idle chained list, make the space piece after head pointer pav points to described merging; As left space piece H LWith right space piece HR when all idle, with right space piece H RWith left space piece H LSpace piece H merges with recovery, substitutes left space piece H with the space piece after the described merging L, and in idle chained list, delete right space piece H R, revise the head pointer pav of idle chained list, make the space piece after head pointer pav points to described merging; As left space piece H LWith right space piece H RWhen not idle, revise to reclaim space piece H busy flag item, amended recovery space piece H is inserted into the heading of idle chained list, revise the head pointer pav of idle chained list, make head pointer pav point to described amended recovery space piece H.
4. the control method of smart card storage environment according to claim 1, it is characterized in that: second storage rule in the storage rule be described second storage class is begun to the method that low address is stored according to the high address end from temporary space be, same context is had in the same memory paragraph of ephemeral data information stores in temporary space in the CLEAR_ON_RESET event attribute, and be that described memory paragraph is created a root node and pointed to the array handle formation of CLEAR_ON_RESET event attribute in lasting space; Be provided with the segment base register on described memory paragraph, the section bias internal amount val_address element memory address addition in described segment base register and the described array handle obtains storing the physical address of data.
5. the control method of smart card storage environment according to claim 1 is characterized in that: second storage rule in the storage rule is described second storage class to be reclaimed adopt object tag absorption method, described object tag absorption method removal process to be,
1) carries out the assignment mark according to the object in the described pointer to object p temporary space pointed, the data message of described assignment mark is quoted by lasting space and is designated as " 02 ", the data message of described assignment mark is quoted by the local variable in the present frame and is designated as " 01 ", and the data message of described assignment mark is not cited and is designated as " 00 ";
2) object to described mark " 02 ", described mark " 01 " and described mark " 00 " institute mark carries out the increment type garbage reclamation.
6. the control method of smart card storage environment according to claim 5, it is characterized in that: described increment type garbage reclamation step has, 1. the data message that is stored in the temporary space in the smart card is preferentially carried out the garbage reclamation of the memory paragraph of current off-duty context correspondence, information after the described recovery is satisfied requisite space, then finish to reclaim; 2. described information after 1. step reclaims is not satisfied requisite space, then reclaim the storage space of reserving; 3. described information after 1. and 2. step reclaims is not satisfied requisite space, then reclaim the adjacent memory paragraph of current operation context memory paragraph; 4. described information after 1., 2. and 3. step reclaims is not satisfied requisite space, then reclaim the unreferenced object space of reserving in the off-duty context memory paragraph; 5. described information after 1., 2., 3. and 4. step reclaims is not satisfied requisite space, then reclaim the unreferenced object space of reserving in the contextual memory paragraph of operation.
7. the control method of smart card storage environment according to claim 1, it is characterized in that: the 3rd storage rule in the storage rule be described the 3rd storage class is begun to the method that high address is stored according to the low address end from temporary space be, same context is had in the same memory paragraph of ephemeral data information stores in temporary space in the CLEAR_ON_DESELECT event attribute, and be that described memory paragraph is created a root node and pointed to the array handle formation of CLEAR_ON_DESELECT event attribute in lasting space; Be provided with the segment base register on described memory paragraph, the section bias internal amount val_address element memory address addition in described segment base register and the described array handle obtains storing the physical address of data.
8. the control method of smart card storage environment according to claim 1 is characterized in that: the 3rd storage rule in the storage rule is described the 3rd storage class to be reclaimed adopt object tag absorption method, described object tag absorption method removal process to be,
1) carries out the assignment mark according to the object in the described pointer to object p temporary space pointed, the data message of described assignment mark is quoted by lasting space and is designated as " 02 ", the data message of described assignment mark is quoted by the local variable in the present frame and is designated as " 01 ", and the data message of described assignment mark is not cited and is designated as " 00 ";
2) object to described mark " 02 ", described mark " 01 " and described mark " 00 " institute mark carries out the increment type garbage reclamation.
9. the control method of smart card storage environment according to claim 8, it is characterized in that: described increment type garbage reclamation step has, 1. the memory paragraph that the data message that is stored in the temporary space in the smart card is carried out current off-duty context correspondence carries out preferential garbage reclamation, information after the described recovery is satisfied requisite space, then finish to reclaim; 2. described information after 1. step reclaims is not satisfied requisite space, then reclaim the storage space of reserving; 3. described information after 1. and 2. step reclaims is not satisfied requisite space, then reclaim the adjacent memory paragraph of current operation context memory paragraph; 4. described information after 1., 2. and 3. step reclaims is not satisfied requisite space, then reclaim the unreferenced object space of reserving in the off-duty context memory paragraph; 5. described information after 1., 2., 3. and 4. step reclaims is not satisfied requisite space, then reclaim the unreferenced object space of reserving in the contextual memory paragraph of operation.
CNB2005100771594A 2005-06-16 2005-06-16 Method for controlling smart card storage environment Expired - Fee Related CN1321377C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100771594A CN1321377C (en) 2005-06-16 2005-06-16 Method for controlling smart card storage environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100771594A CN1321377C (en) 2005-06-16 2005-06-16 Method for controlling smart card storage environment

Publications (2)

Publication Number Publication Date
CN1687904A CN1687904A (en) 2005-10-26
CN1321377C true CN1321377C (en) 2007-06-13

Family

ID=35305945

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100771594A Expired - Fee Related CN1321377C (en) 2005-06-16 2005-06-16 Method for controlling smart card storage environment

Country Status (1)

Country Link
CN (1) CN1321377C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344861B (en) * 2007-07-10 2012-12-05 锐迪科微电子(上海)有限公司 Smart card internal memory management method
US8402217B2 (en) * 2009-09-15 2013-03-19 Marvell International Ltd. Implementing RAID in solid state memory
CN102053834A (en) * 2010-12-29 2011-05-11 北京握奇数据系统有限公司 Method and device for storing JAVA object
CN102289411B (en) * 2011-06-27 2014-03-26 北京握奇数据系统有限公司 Intelligent card resource dispatching method and intelligent card
CN102508788B (en) * 2011-09-28 2014-12-10 华为数字技术(成都)有限公司 SSD (solid state drive) and SSD garbage collection method and device
CN103051869A (en) * 2012-11-15 2013-04-17 山东中孚信息产业股份有限公司 System and method for encrypting camera video in real time
CN104484628B (en) * 2014-12-17 2018-04-13 西安邮电大学 It is a kind of that there is the multi-application smart card of encrypting and decrypting
CN105404589B (en) * 2015-10-29 2019-04-30 天脉聚源(北京)教育科技有限公司 A kind of rubbish recovering method and device
US10120655B2 (en) * 2016-06-03 2018-11-06 Microsoft Technology Licensing, Llc. Seamless high performance interoperability between different type graphs that share a garbage collector
CN108804339B (en) * 2018-03-29 2019-07-16 北京白山耘科技有限公司 A kind of memory rubbish recovering method and device
CN109032960B (en) * 2018-06-29 2023-10-10 北京中电华大电子设计有限责任公司 Dynamic allocation method of smart card RAM and storage device of data structure
KR20200027858A (en) 2018-09-05 2020-03-13 에스케이하이닉스 주식회사 Memory controller and memory system having the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1289967A (en) * 1999-09-24 2001-04-04 国际商业机器公司 Dynamic memory administration for target data in small allied programme in Jave card
US6220510B1 (en) * 1997-05-15 2001-04-24 Mondex International Limited Multi-application IC card with delegation feature
US6272607B1 (en) * 1998-08-28 2001-08-07 International Business Machines Corporation Method and apparatus for transactional writing of data into a persistent memory
CN1545072A (en) * 1997-09-19 2004-11-10 施蓝姆伯格工业公司 Smart card application-selection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6220510B1 (en) * 1997-05-15 2001-04-24 Mondex International Limited Multi-application IC card with delegation feature
CN1545072A (en) * 1997-09-19 2004-11-10 施蓝姆伯格工业公司 Smart card application-selection
US6272607B1 (en) * 1998-08-28 2001-08-07 International Business Machines Corporation Method and apparatus for transactional writing of data into a persistent memory
CN1289967A (en) * 1999-09-24 2001-04-04 国际商业机器公司 Dynamic memory administration for target data in small allied programme in Jave card

Also Published As

Publication number Publication date
CN1687904A (en) 2005-10-26

Similar Documents

Publication Publication Date Title
CN1321377C (en) Method for controlling smart card storage environment
US6453403B1 (en) System and method for memory management using contiguous fixed-size blocks
US6862674B2 (en) Methods and apparatus for performing a memory management technique
JP3027845B2 (en) Program control device and method
US5848423A (en) Garbage collection system and method for locating root set pointers in method activation records
US6505283B1 (en) Efficient memory allocator utilizing a dual free-list structure
US6594749B1 (en) System and method for memory management using fixed-size blocks
US7043509B2 (en) Parallel non-contiguous allocation and card parsing
CN102722415B (en) Garbage collecting method based on Java system on chip (SoC) with stack system structure
US9116798B2 (en) Optimized memory management for class metadata
EP2880538B1 (en) System and method for object deletion in persistent memory using bitmap windows
KR19990007400A (en) A bounded downtime closed area recovery system and method comprising a write barrier associated with a source instance of some relocated object
US8631051B2 (en) Hybrid fragmenting real time garbage collection
US7822938B2 (en) System and method for performing garbage collection based on unmanaged memory allocations
US20090037501A1 (en) Method and system for managing memory for a program using area
WO2002103527A2 (en) A method for using non-temporal streaming stores to improve garbage collection algorithm
CN116521576B (en) EDA software data processing system
CN106406748A (en) Memory centric database architecture
US5950231A (en) Memory manager system
WO1999067711A1 (en) System and method for optimizing representation of associations in object-oriented programming environments
US8990532B2 (en) Method of managing memory in computer system, computer system and memory managing program
US20050149346A1 (en) Method and apparatus for efficient implementation of discontiguous objects
Diwase et al. Survey report on memory allocation strategies for real time operating system in context with embedded devices
US20040162860A1 (en) Parallel card table scanning and updating
JP2000099351A (en) Program controller and memory allocation device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070613

Termination date: 20100616