CN110059019A - A kind of distribution method and device, calculating equipment and storage medium of memory address - Google Patents

A kind of distribution method and device, calculating equipment and storage medium of memory address Download PDF

Info

Publication number
CN110059019A
CN110059019A CN201910308438.9A CN201910308438A CN110059019A CN 110059019 A CN110059019 A CN 110059019A CN 201910308438 A CN201910308438 A CN 201910308438A CN 110059019 A CN110059019 A CN 110059019A
Authority
CN
China
Prior art keywords
class
storage location
internal storage
memory
label
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.)
Granted
Application number
CN201910308438.9A
Other languages
Chinese (zh)
Other versions
CN110059019B (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.)
Guangzhou Xishanju Network Technology Co ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
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 Western Hills Residence Guangzhou Shi You Network Technology Co Ltd, Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Priority to CN201910308438.9A priority Critical patent/CN110059019B/en
Publication of CN110059019A publication Critical patent/CN110059019A/en
Application granted granted Critical
Publication of CN110059019B publication Critical patent/CN110059019B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)

Abstract

The application provides the distribution method and device, calculating equipment and storage medium of a kind of memory address, the method comprise the steps that defining the label of each class, and corresponding first internal storage location list is distributed for the label of each class, wherein, the first internal storage location list includes multiple first memory cell address;According to the label of each class and corresponding first internal storage location list, generate the corresponding first Memory Allocation instruction of label of each class, the label for only needing to combine memory cell address that such can be obtained at the time of reading, without individually indicating class label again as prior art, to save the memory space for this tag along sort, data access and treatment effeciency are greatly improved.

Description

A kind of distribution method and device, calculating equipment and storage medium of memory address
Technical field
This application involves Internet technical field, in particular to the distribution method and device, calculating of a kind of memory address are set Standby and storage medium.
Background technique
Reflection is a kind of ability that program is accessible, detects and modify itself state or behavior, and many language all prop up Hold reflection, such as Java, C Plus Plus etc..
By taking Java as an example: the Java reflection mechanism of the prior art be in operating status, can for any one class The all properties and method for obtaining this class can call any one object its any one attribute and method. The function of this method for obtaining information and dynamic call object dynamic at runtime is known as the reflection mechanism of Java.
Class class is supported together with java.lang.reflect class libraries the concept of reflection that the class libraries contains Field, Method, Constructor class (each class realizes Member interface).By JVM when the object of these types (Java Virtual Machine, Java Virtual Machine) creates when running, to indicate corresponding member in unknown class.These Type object also becomes the label of class, when creating each class, it is necessary to while such corresponding label is created for indicating this Class.When carrying out reading data calling, it is also necessary to which the content for first reading label could identify such particular content later.
Class class in C Plus Plus includes ID (such label), for identifying such content, or saves such RTTI (Run-Time Type Identification, runtime type identification) and V-table (virtual table).But The label of class can occupy biggish memory space, such as in C Plus Plus, and memory space shared by a usual class is 128bit, and wherein having the space of 64bit is such label substance.In this way, label occupies half memory space, because This, causes data access efficiency very low.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of distribution method of memory address and device, calculates equipment and deposit Storage media, to solve technological deficiency existing in the prior art.
The embodiment of the present application provides a kind of distribution method of memory address, which comprises
The label of each class is defined, and distributes corresponding first internal storage location list for the label of each class, wherein The first internal storage location list includes multiple first memory cell address;
According to the label of each class and corresponding first internal storage location list, the label corresponding of each class is generated The instruction of one Memory Allocation.
Optionally, the method also includes:
In the case where receiving object generation instruction, the corresponding class of the object is determined;
According to the corresponding first Memory Allocation instruction of the label lookup of the class, and instructed according to first Memory Allocation Determine the corresponding first internal storage location list of the label of the class;
It is described right that unappropriated first memory cell address in the first internal storage location list is distributed to As.
Optionally, the method also includes:
According to the label of class, the specifications parameter of class is generated;
According to the first memory cell address number of the first internal storage location list, corresponding first memory block size ginseng is generated Number;
It is raw according to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location list It is instructed at the first Memory Allocation.
Optionally, the first internal storage location list includes N number of first memory cell address, wherein N >=2;
It is described right that unappropriated first memory cell address in the first internal storage location list is distributed to As, comprising:
S1, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing Step S2, if it is not, executing step S3, wherein 1≤i≤N;
S2, i is added to 1 certainly, whether i of the judgement from after adding 1 is less than N, if so, execution step S1, if it is not, execution step S4;
S3, i-th of first memory cell address are distributed into the object;
S4, distribution failure notification is returned.
Optionally, the method also includes:
Determining all occupied feelings of the first memory cell address in the corresponding first internal storage location list of the class It is again that such label distributes corresponding second internal storage location list under condition, wherein the second internal storage location list includes Multiple second memory cell address;
According to the label of each class and corresponding second internal storage location list, the label corresponding of each class is generated The instruction of two Memory Allocations.
Optionally, the method also includes:
In the case where receiving object generation instruction, the corresponding class of the object is determined;
According to the corresponding second Memory Allocation instruction of the label lookup of the class, and instructed according to second Memory Allocation Determine the corresponding second internal storage location list of the label of the class;
It is described right that unappropriated second memory cell address in the second internal storage location list is distributed to As.
Optionally, the method also includes:
According to the label of class, the specifications parameter of class is generated;
According to the second memory cell address number of the second internal storage location list, the second memory block size parameter is generated;
It is raw according to the label of each class, the specifications parameter of class, the second memory block size parameter and the second internal storage location list It is instructed at the second Memory Allocation.
Optionally, each first memory cell address includes multiple memory address, and first internal storage location arranges Multiple first memory cell address in table are continuous memory address;
Each second memory cell address includes multiple memory address, and more in the second internal storage location list A second memory cell address is continuous memory address.
The embodiment of the present application discloses a kind of distributor of memory address, and described device includes:
Internal storage location distribution module is configured as defining the label of each class, and is the distribution pair of the label of each class The the first internal storage location list answered, wherein the first internal storage location list includes multiple first memory cell address;
Memory Allocation directive generation module is configured as label and corresponding first internal storage location according to each class List generates the corresponding first Memory Allocation instruction of label of each class.
Optionally, described device further include:
First kind determining module is configured as determining that the object is corresponding in the case where receiving object generation instruction Class;
First searching module is configured as the corresponding first Memory Allocation instruction of label lookup according to the class, and root The corresponding first internal storage location list of label of the class is determined according to first Memory Allocation instruction;
First object distribution module is configured as one unappropriated first in the first internal storage location list Memory cell address distributes to the object.
Optionally, the Memory Allocation directive generation module is also configured to
According to the label of class, the specifications parameter of class is generated;
According to the first memory cell address number of the first internal storage location list, corresponding first memory block size ginseng is generated Number;
It is raw according to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location list It is instructed at the first Memory Allocation.
Optionally, the first internal storage location list includes N number of first memory cell address, wherein N >=2;
The first object distribution module is specifically configured to:
S1, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing Step S2, if it is not, executing step S3, wherein 1≤i≤N;
S2, i is added to 1 certainly, whether i of the judgement from after adding 1 is less than N, if so, execution step S1, if it is not, execution step S4;
S3, i-th of first memory cell address are distributed into the object;
S4, distribution failure notification is returned.
Optionally, the internal storage location distribution module is also configured to determining corresponding first internal storage location of the class The first memory cell address in list is all that such label distributes corresponding second memory in occupied situation again Unit list, wherein the second internal storage location list includes multiple second memory cell address;
Memory Allocation directive generation module is also configured to according to deposit receipt in the label of each class and corresponding second First list generates the corresponding second Memory Allocation instruction of label of each class.
Optionally, described device further include:
Second class determining module is configured as determining that the object is corresponding in the case where receiving object generation instruction Class;
Second searching module is configured as the corresponding second Memory Allocation instruction of label lookup according to the class, and root The corresponding second internal storage location list of label of the class is determined according to second Memory Allocation instruction;
Second object distribution module is configured as one unappropriated second in the second internal storage location list Memory cell address distributes to the object.
Optionally, the Memory Allocation directive generation module is also configured to the label according to class, generates the specification ginseng of class Number;According to the second memory cell address number of the second internal storage location list, the second memory block size parameter is generated;According to each The label of class, the specifications parameter of class, the second memory block size parameter and the second internal storage location list generate the second Memory Allocation and refer to It enables.
Optionally, each first memory cell address includes multiple memory address, and first internal storage location arranges Multiple first memory cell address in table are continuous memory address;
Each second memory cell address includes multiple memory address, and more in the second internal storage location list A second memory cell address is continuous memory address.
The embodiment of the present application discloses a kind of calculating equipment, including memory, processor and storage are on a memory and can The computer instruction run on a processor, the processor realize the distribution of memory address as described above when executing described instruction The step of method.
The embodiment of the present application discloses a kind of computer readable storage medium, is stored with computer instruction, the instruction quilt The step of processor realizes the distribution method of memory address as described above when executing.
The distribution method and device of memory address provided by the present application distribute corresponding the by the label of each class One internal storage location list generates the label of each class then according to the label of each class and corresponding first internal storage location list Corresponding first Memory Allocation instruction, the label for only needing to combine memory cell address that such can be obtained at the time of reading are not necessarily to Class label is indicated using ID or V-table as prior art, so that the memory space for this tag along sort has been saved, Greatly improve data access and treatment effeciency.
In addition, under the first memory cell address all occupied situation, the method for the present embodiment can also be further according to The label of class distributes corresponding second internal storage location list, guarantees that such each object can be assigned to corresponding interior deposit receipt First address.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the calculating equipment of one embodiment of the application;
Fig. 2 is the flow diagram of the distribution method of the memory address of one embodiment of the application;
Fig. 3 is the flow diagram of the distribution method of the memory address of one embodiment of the application;
Fig. 4 is the flow diagram of the distribution method of the memory address of one embodiment of the application;
Fig. 5 is the schematic diagram of the first Memory Allocation instruction of one embodiment of the application;
Fig. 6 is the flow diagram of the distribution method of the memory address of another embodiment of the application;
Fig. 7 is the schematic diagram of the instruction of the first Memory Allocation and the instruction of the second Memory Allocation of one embodiment of the application;
Fig. 8 is the structural schematic diagram of the distributor of the memory address of another embodiment of the application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments, It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... " or " in response to determination ".
Firstly, the vocabulary of terms being related to one or more embodiments of the invention explains.
Class (class): the abstract of object with identical characteristic (data element) and behavior () is exactly class.Class is practical Upper is exactly a kind of data type.Class is a static concept, and class itself does not carry any data.It is created when not for class any When object, class itself is not present in memory headroom.Class has label, it is the abstract of the state of object, with data structure come The attribute of class is described.
Object (object): object is the anything that people will be studied, it can not only indicate specific things, also It can indicate abstract rule, plan or event.Object has state, and an object describes its state with data value.Class with The relationship of object is as the relationship of mold and casting, and the result of the materialization of class is exactly object, and the abstract result of object is exactly Class.
In this application, the distribution method and device, calculating equipment and storage medium of a kind of memory address are provided, under It is described in detail one by one in the embodiment in face.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100 Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130, Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network (WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 1 of equipment 100 are calculated Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 merely for the sake of Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it His component.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type Server.
Wherein, processor 120 can execute the step in method shown in Fig. 2.Fig. 2 is to show to be implemented according to the application one The schematic flow chart of the distribution method of the memory address of example, including step 201 is to step 202.
201, the label of each class is defined, and distributes corresponding first internal storage location list for the label of each class, Wherein, the first internal storage location list includes multiple first memory cell address.
In the present embodiment, memory cell address can be divided by memory allocator (Memory Allocator) Match.
Wherein, when creating a class, it is necessary to while such label is created, for indicating such.Such as " Person " Class mark is " people " this class, such may include many individual (objects), and " Person " is such label.
Memory address generally uses 4 16 systems and 8 16 systems to indicate.By taking 4 16 systems as an example, memory address 0x0001 indicates to be to number the memory address for being 1;By taking 8 16 systems as an example, memory address 0x00000001 expression is to compile Number be 1 memory address.
Specifically, each first memory cell address includes multiple memory address, the label of each class corresponding The first memory cell address that one internal storage location list includes can be continuous, or discrete.It is specific at one Implementation in, the label of a class is A, the memory address of such corresponding first internal storage location be 0x0001~ 0x0005, the memory address of second internal storage location are 0x0006~0x0010.
202, according to the label of each class and corresponding first internal storage location list, the label for generating each class is corresponding The first Memory Allocation instruction.
The distribution method of memory address provided in this embodiment passes through the label and corresponding first memory according to each class Unit list generates the corresponding first Memory Allocation instruction of label of each class, only needs to combine memory cell address at the time of reading Such label can be obtained, without indicating class label using ID or V-table as prior art, be used for save The memory space of this tag along sort, greatly improves data access and treatment effeciency.
In addition, in specific application, for each class, can also further be given birth to after generating the instruction of the first Memory Allocation In pairs as.Referring to Fig. 3, the method also includes:
301, in the case where receiving object generation instruction, the corresponding class of the object is determined.
302, it is instructed according to corresponding first Memory Allocation of the label lookup of the class, and according to first Memory Allocation Instruction determines the corresponding first internal storage location list of label of the class.
303, unappropriated first memory cell address in the first internal storage location list is distributed into institute State object.
It should be noted that only distributing first memory cell address every time for each object.In this way, initial During generating Memory Allocation instruction, need to pre-set for the memory address that each first memory cell address includes Number, such as it includes 8 memory address that each first memory cell address, which is arranged,.
Specifically, the first internal storage location list includes N number of first memory cell address, wherein N >=2, step 303 include Following step 401~404:
401, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing Step 402, if it is not, executing step 403, wherein 1≤i≤N.
402, by i from adding 1, whether i of the judgement from after adding 1 is less than N, if so, step 401 is executed, if it is not, execution step 404。
403, i-th of first memory cell address are distributed into the object.
404, distribution failure notification is returned.
In addition, the first Memory Allocation instruction generated removes the label for including class and corresponding first internal storage location of label arranges Further include the specifications parameter and the first memory block size parameter of class except table, characterize respectively space size shared by the label of class and The size of first internal storage location.
The method also includes:
S11, the label according to class, generate the specifications parameter of class.
It is big to generate corresponding first memory block by S12, the first memory cell address number according to the first internal storage location list Small parameter.
S13, it is arranged according to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location Table generates the instruction of the first Memory Allocation.
It is the schematic diagram of the first Memory Allocation instruction generated using the distribution method of the present embodiment referring to Fig. 5, Fig. 5.? In the first Memory Allocation instruction of diagram, the instruction of the first Memory Allocation includes:
The label (Type) of class: A;
The specifications parameter (Typesize) of class: 17;
First memory block size parameter (countperchunk): 6;
First internal storage location list (freecell): 0x10000000~(0x10000000+6*17).
One embodiment of the application discloses a kind of distribution method of memory address, referring to Fig. 6, comprising:
601, the label of each class is defined, and distributes corresponding first internal storage location list for the label of each class, Wherein, the first internal storage location list includes multiple first memory cell address.
602, according to the label of each class and corresponding first internal storage location list, the label for generating each class is corresponding The first Memory Allocation instruction.
Wherein, step 601~602 are identical as the step 201 of previous embodiment~202, and the present embodiment just repeats no more.
603, in the case where receiving object generation instruction, the corresponding class of the object is determined.
604, it is instructed according to corresponding first Memory Allocation of the label lookup of the class, and according to first Memory Allocation Instruction determines the corresponding first internal storage location list of label of the class.
605, check whether the first memory cell address in the first internal storage location list is all occupied, if so, executing Step 606, if it is not, executing step 607.
606, unappropriated first memory cell address in the first internal storage location list is distributed into institute State object.
It should be noted that only distributing second memory cell address every time for each object.In this way, initial During generating Memory Allocation instruction, need to pre-set for the memory address that each second memory cell address includes Number, such as it includes 8 memory address that each second memory cell address, which is arranged,.
Specifically, the second internal storage location list includes M the second memory cell address, wherein M >=2, step 606 include Following step S6061~S6064:
S6061, check whether j-th of second memory cell address in the second internal storage location list are occupied, if so, holding Row step S6062, if it is not, executing step S6063, wherein 1≤j≤M.
S6062, j is added to 1 certainly, whether j of the judgement from after adding 1 is less than M, if so, execution step S6061, if it is not, executing step Rapid S6064.
S6063, j-th of second memory cell address are distributed into the object.
S6064, distribution failure notification is returned.
In the second memory cell address all in occupied situation of the second internal storage location list, can also further give birth to At the corresponding third internal storage location list of the label of class.Wherein, deposit receipt in the generation method of third internal storage location list and second First list is similar, and the present embodiment just repeats no more.
607, corresponding second internal storage location list is distributed for such label again, wherein second internal storage location List includes multiple second memory cell address.
Optionally, each second memory cell address includes multiple memory address, and more in the second internal storage location list A second memory cell address is continuous memory address.
608, according to the label of each class and corresponding second internal storage location list, the label for generating each class is corresponding The second Memory Allocation instruction.
In addition, the second Memory Allocation instruction generated removes the label for including class and corresponding second internal storage location of label arranges Further include the specifications parameter and the second memory block size parameter of class except table, characterize respectively space size shared by the label of class and The size of first internal storage location.
The method also includes:
S21, the label according to class, generate the specifications parameter of class.
S22, the second memory cell address number according to the second internal storage location list generate the second memory block size ginseng Number.
S23, it is arranged according to the label of each class, the specifications parameter of class, the second memory block size parameter and the second internal storage location Table generates the instruction of the second Memory Allocation.
It is the first Memory Allocation instruction generated using the distribution method of the present embodiment and the second memory referring to Fig. 7, Fig. 7 Distribute the schematic diagram of instruction.In the first Memory Allocation instruction of diagram, the instruction of the first Memory Allocation includes:
The label (Type) of class: B;
The specifications parameter (Typesize) of class: 30;
First memory block size parameter (countperchunk): 3;
First internal storage location list (freecell): 0,1,2.
Wherein, 0,1,2 be the first internal storage location serial number.
Second Memory Allocation instructs
The label (Type) of class: B;
The specifications parameter (Typesize) of class: 30;
Second memory block size parameter (countperchunk): 3;
Second internal storage location list (freecell): 3,4,5.
Wherein, 3,4,5 be the first internal storage location serial number.
As it can be seen that being instructed for the second Memory Allocation, the label of class, the specifications parameter of class and the second memory block size parameter With the label of class, the specifications parameter of class and the first uniform cause of memory block size parameter of the instruction of the first Memory Allocation.
The distribution method of memory address provided by the present application distributes corresponding first memory by the label of each class Unit list, then according to the label of each class and corresponding first internal storage location list, the label for generating each class is corresponding The instruction of first Memory Allocation, the label for only needing to combine memory cell address that such can be obtained at the time of reading, without such as existing Technology uses ID or V-table to indicate class label like that and mentions significantly to save the memory space for this tag along sort Data access and treatment effeciency are risen.
In addition, though increasing the field of the label of class in the application in memory allocator, a part of memory is occupied, But compared with the prior art in the label of each class is indicated by additional ID or V-table, the quantity of especially class is very big In the case where, memory can be saved.
In addition, under the first memory cell address all occupied situation, the method for the present embodiment can also be further according to The label of class distributes corresponding second internal storage location list, guarantees that such each object can be assigned to corresponding interior deposit receipt First address.
One embodiment of the application also discloses a kind of distributor of memory address, and referring to Fig. 8, described device includes:
Internal storage location distribution module 801 is configured as defining the label of each class, and distributes for the label of each class Corresponding first internal storage location list, wherein the first internal storage location list includes multiple first memory cell address;
Memory Allocation directive generation module 802 is configured as label and corresponding first memory according to each class Unit list generates the corresponding first Memory Allocation instruction of label of each class.
Optionally, described device further include:
First kind determining module 803 is configured as determining the object pair in the case where receiving object generation instruction The class answered;
First searching module 804 is configured as the corresponding first Memory Allocation instruction of label lookup according to the class, and The corresponding first internal storage location list of label of the class is determined according to first Memory Allocation instruction;
First object distribution module 805 is configured as one in the first internal storage location list is unappropriated First memory cell address distributes to the object.
Optionally, the Memory Allocation directive generation module 802 is also configured to
According to the label of class, the specifications parameter of class is generated;
According to the first memory cell address number of the first internal storage location list, corresponding first memory block size ginseng is generated Number;
It is raw according to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location list It is instructed at the first Memory Allocation.
Optionally, the first internal storage location list includes N number of first memory cell address, wherein N >=2;
The first object distribution module 805 is specifically configured to:
S1, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing Step S2, if it is not, executing step S3, wherein 1≤i≤N;
S2, i is added to 1 certainly, whether i of the judgement from after adding 1 is less than N, if so, execution step S1, if it is not, execution step S4;
S3, i-th of first memory cell address are distributed into the object;
S4, distribution failure notification is returned.
Optionally, the internal storage location distribution module 801 is also configured to determining deposit receipt in the class corresponding first The first memory cell address in first list is all in occupied situation, again in such label distribution corresponding second Memory cell list, wherein the second internal storage location list includes multiple second memory cell address;
Memory Allocation directive generation module 802 is also configured to according in the label of each class and corresponding second Memory cell list generates the corresponding second Memory Allocation instruction of label of each class.
Optionally, described device further include:
Second class determining module 806 is configured as determining the object pair in the case where receiving object generation instruction The class answered;
Second searching module 807 is configured as the corresponding second Memory Allocation instruction of label lookup according to the class, and The corresponding second internal storage location list of label of the class is determined according to second Memory Allocation instruction;
Second object distribution module 808 is configured as one in the second internal storage location list is unappropriated Second memory cell address distributes to the object.
Optionally, the Memory Allocation directive generation module 802 is also configured to the label according to class, generates the rule of class Lattice parameter;According to the second memory cell address number of the second internal storage location list, the second memory block size parameter is generated;According to The label of each class, the specifications parameter of class, the second memory block size parameter and the second internal storage location list generate the second memory point With instruction.
Optionally, each first memory cell address includes multiple memory address, and first internal storage location arranges Multiple first memory cell address in table are continuous memory address;Each second memory cell address includes in multiple Address is deposited, and multiple second memory cell address in the second internal storage location list are continuous memory address.
The distributor of memory address provided in this embodiment passes through the label and corresponding first memory according to each class Unit list generates the corresponding first Memory Allocation instruction of label of each class, only needs to combine memory cell address at the time of reading Such label can be obtained, without indicating class label using ID or V-table as prior art, be used for save The memory space of this tag along sort, greatly improves data access and treatment effeciency.
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction The step of distribution method of memory address as previously described is realized when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited The technical solution of the technical solution of storage media and the distribution method of above-mentioned memory address belongs to same design, the skill of storage medium The detail content that art scheme is not described in detail may refer to the description of the technical solution of the distribution method of above-mentioned memory address.
The computer instruction includes computer program code, the computer program code can for source code form, Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification, It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only It is limited by claims and its full scope and equivalent.

Claims (18)

1. a kind of distribution method of memory address, which is characterized in that the described method includes:
The label of each class is defined, and distributes corresponding first internal storage location list for the label of each class, wherein is described First internal storage location list includes multiple first memory cell address;
According to the label of each class and corresponding first internal storage location list, generate in the label corresponding first of each class Deposit distribution instruction.
2. the method as described in claim 1, which is characterized in that the method also includes:
In the case where receiving object generation instruction, the corresponding class of the object is determined;
According to the corresponding first Memory Allocation instruction of the label lookup of the class, and is instructed and determined according to first Memory Allocation The corresponding first internal storage location list of the label of the class;
Unappropriated first memory cell address in the first internal storage location list is distributed into the object.
3. the method as described in claim 1, which is characterized in that the method also includes:
According to the label of class, the specifications parameter of class is generated;
According to the first memory cell address number of the first internal storage location list, corresponding first memory block size parameter is generated;
According to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location list, the is generated The instruction of one Memory Allocation.
4. method according to claim 2, which is characterized in that the first internal storage location list includes N number of first internal storage location Location, wherein N >=2;
Unappropriated first memory cell address in the first internal storage location list is distributed into the object, is wrapped It includes:
S1, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing step S2, if it is not, executing step S3, wherein 1≤i≤N;
S2, i is added to 1 certainly, whether i of the judgement from after adding 1 is less than N, if so, execution step S1, if it is not, execution step S4;
S3, i-th of first memory cell address are distributed into the object;
S4, distribution failure notification is returned.
5. the method as described in claim 1, which is characterized in that the method also includes:
Determining the first memory cell address in the corresponding first internal storage location list of the class all in occupied situation, Again corresponding second internal storage location list is distributed for such label, wherein the second internal storage location list includes multiple Second memory cell address;
According to the label of each class and corresponding second internal storage location list, generate in the label corresponding second of each class Deposit distribution instruction.
6. method as claimed in claim 5, which is characterized in that the method also includes:
In the case where receiving object generation instruction, the corresponding class of the object is determined;
According to the corresponding second Memory Allocation instruction of the label lookup of the class, and is instructed and determined according to second Memory Allocation The corresponding second internal storage location list of the label of the class;
Unappropriated second memory cell address in the second internal storage location list is distributed into the object.
7. method as claimed in claim 5, which is characterized in that the method also includes:
According to the label of class, the specifications parameter of class is generated;
According to the second memory cell address number of the second internal storage location list, the second memory block size parameter is generated;
According to the label of each class, the specifications parameter of class, the second memory block size parameter and the second internal storage location list, the is generated The instruction of two Memory Allocations.
8. method as claimed in claim 5, which is characterized in that
Each first memory cell address includes multiple memory address, and multiple in the first internal storage location list One memory cell address is continuous memory address;
Each second memory cell address includes multiple memory address, and multiple in the second internal storage location list Two memory cell address are continuous memory address.
9. a kind of distributor of memory address, which is characterized in that described device includes:
Internal storage location distribution module is configured as defining the label of each class, and corresponding for the distribution of the label of each class First internal storage location list, wherein the first internal storage location list includes multiple first memory cell address;
Memory Allocation directive generation module is configured as being arranged according to the label of each class and corresponding first internal storage location Table generates the corresponding first Memory Allocation instruction of label of each class.
10. device as claimed in claim 9, which is characterized in that described device further include:
First kind determining module is configured as determining the corresponding class of the object in the case where receiving object generation instruction;
First searching module is configured as the corresponding first Memory Allocation instruction of label lookup according to the class, and according to institute State the corresponding first internal storage location list of label that the instruction of the first Memory Allocation determines the class;
First object distribution module is configured as unappropriated first memory in the first internal storage location list Distribute to the object in element address.
11. device as claimed in claim 9, which is characterized in that the Memory Allocation directive generation module is also configured to
According to the label of class, the specifications parameter of class is generated;
According to the first memory cell address number of the first internal storage location list, corresponding first memory block size parameter is generated;
According to the label of each class, the specifications parameter of class, the first memory block size parameter and the first internal storage location list, the is generated The instruction of one Memory Allocation.
12. device as claimed in claim 10, which is characterized in that the first internal storage location list includes N number of first internal storage location Address, wherein N >=2;
The first object distribution module is specifically configured to:
S1, check whether i-th of first memory cell address in the first internal storage location list are occupied, if so, executing step S2, if it is not, executing step S3, wherein 1≤i≤N;
S2, i is added to 1 certainly, whether i of the judgement from after adding 1 is less than N, if so, execution step S1, if it is not, execution step S4;
S3, i-th of first memory cell address are distributed into the object;
S4, distribution failure notification is returned.
13. device as claimed in claim 9, which is characterized in that the internal storage location distribution module is also configured in determination The first memory cell address in the corresponding first internal storage location list of the class is again all such in occupied situation Label distribute corresponding second internal storage location list, wherein the second internal storage location list includes deposit receipt in multiple second First address;
Memory Allocation directive generation module is also configured to be arranged according to the label of each class and corresponding second internal storage location Table generates the corresponding second Memory Allocation instruction of label of each class.
14. device as claimed in claim 13, which is characterized in that described device further include:
Second class determining module is configured as determining the corresponding class of the object in the case where receiving object generation instruction;
Second searching module is configured as the corresponding second Memory Allocation instruction of label lookup according to the class, and according to institute State the corresponding second internal storage location list of label that the instruction of the second Memory Allocation determines the class;
Second object distribution module is configured as unappropriated second memory in the second internal storage location list Distribute to the object in element address.
15. device as claimed in claim 13, which is characterized in that the Memory Allocation directive generation module is also configured to
According to the label of class, the specifications parameter of class is generated;
According to the second memory cell address number of the second internal storage location list, the second memory block size parameter is generated;
According to the label of each class, the specifications parameter of class, the second memory block size parameter and the second internal storage location list, the is generated The instruction of two Memory Allocations.
16. device as claimed in claim 13, which is characterized in that
Each first memory cell address includes multiple memory address, and multiple in the first internal storage location list One memory cell address is continuous memory address;
Each second memory cell address includes multiple memory address, and multiple in the second internal storage location list Two memory cell address are continuous memory address.
17. a kind of calculating equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine instruction, which is characterized in that the processor realizes the step of claim 1-8 any one the method when executing described instruction Suddenly.
18. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor The step of claim 1-8 any one the method is realized when row.
CN201910308438.9A 2019-04-17 2019-04-17 Memory address allocation method and device, computing equipment and storage medium Active CN110059019B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910308438.9A CN110059019B (en) 2019-04-17 2019-04-17 Memory address allocation method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910308438.9A CN110059019B (en) 2019-04-17 2019-04-17 Memory address allocation method and device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110059019A true CN110059019A (en) 2019-07-26
CN110059019B CN110059019B (en) 2021-12-10

Family

ID=67319327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910308438.9A Active CN110059019B (en) 2019-04-17 2019-04-17 Memory address allocation method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110059019B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6088777A (en) * 1997-11-12 2000-07-11 Ericsson Messaging Systems, Inc. Memory system and method for dynamically allocating a memory divided into plural classes with different block sizes to store variable length messages
CN103324582A (en) * 2013-06-17 2013-09-25 华为技术有限公司 Memory migration method, memory migration device and equipment
CN107045436A (en) * 2016-02-05 2017-08-15 龙芯中科技术有限公司 Access processing method and device
CN107728937A (en) * 2017-09-15 2018-02-23 上海交通大学 A kind of key-value pair persistence methods and system using Nonvolatile memory medium
CN107818118A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Date storage method and device
CN109508317A (en) * 2018-10-31 2019-03-22 武汉光谷联众大数据技术有限责任公司 A kind of Large Volume Data and service management system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6088777A (en) * 1997-11-12 2000-07-11 Ericsson Messaging Systems, Inc. Memory system and method for dynamically allocating a memory divided into plural classes with different block sizes to store variable length messages
CN103324582A (en) * 2013-06-17 2013-09-25 华为技术有限公司 Memory migration method, memory migration device and equipment
CN107045436A (en) * 2016-02-05 2017-08-15 龙芯中科技术有限公司 Access processing method and device
CN107818118A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Date storage method and device
CN107728937A (en) * 2017-09-15 2018-02-23 上海交通大学 A kind of key-value pair persistence methods and system using Nonvolatile memory medium
CN109508317A (en) * 2018-10-31 2019-03-22 武汉光谷联众大数据技术有限责任公司 A kind of Large Volume Data and service management system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C. KOLIAS: "A secure and efficient authentication protocol for passive RFID tags", 《2009 6TH INTERNATIONAL SYMPOSIUM ON WIRELESS COMMUNICATION SYSTEMS》 *
陆云飞: "浅谈C语言数据与内存分配空间和地址的联系", 《科技信息》 *

Also Published As

Publication number Publication date
CN110059019B (en) 2021-12-10

Similar Documents

Publication Publication Date Title
CN113377540A (en) Cluster resource scheduling method and device, electronic equipment and storage medium
US20140223427A1 (en) System, Method and Apparatus for Determining Virtual Machine Performance
CN109492017A (en) Business information inquiry processing method, system, computer equipment and storage medium
CN104050543B (en) Event-handling method and stream processing system in stream processing system
CN109857551A (en) Dispatching method and device, the electronic equipment of Service Source based on cloud computing
CN111949324A (en) Distributed serial number generation method and device
CN204695386U (en) Towards the management information system of many tenants
CN109710235B (en) Transaction implementation system and method based on Java intelligent contract service logic
CN111538605A (en) Distributed data access layer middleware and command execution method and device
CN107205015A (en) The implementation method and device of open interface
CN110750530A (en) Service system and data checking method thereof
CN113485830A (en) Micro-service automatic capacity expansion method for power grid monitoring system
CN109597825B (en) Rule engine calling method, device, equipment and computer readable storage medium
CN109271247A (en) Memory Optimize Method, device, computer installation and storage medium
CN106293679B (en) A kind of element term conflict processing method and device
CN110059019A (en) A kind of distribution method and device, calculating equipment and storage medium of memory address
CN115361285B (en) Method, device, equipment and medium for realizing off-line service mixed deployment
CN116308521A (en) Member rights configuration processing method, system, computer equipment and medium
Kalmanek The essential elements of successful innovation
CN116151631A (en) Service decision processing system, service decision processing method and device
CN102184105A (en) Data processing method based on modularity and data center system
CN116304079A (en) Timing-based profile data management method, apparatus, and readable storage medium
CN108287719A (en) Call the cut-in method and application server of anti-fake system
CN106998386A (en) Method and device for adding contact way and user terminal
CN108052521A (en) Coordination data display methods, application server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant before: GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Patentee after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Patentee before: Guangzhou Xishanju Network Technology Co.,Ltd.