Patent US4457254A successfully refreshed from Google Patents.
← Back to Patent Explorer
EP0817044A2 Expired / Lapsed EP ⏱️ 0.0 years remaining

Memory allocation in a multithreaded environment

Assignee: Sun Microsystems Inc
•
Filing: 1997-06-27
•
Granted: —
•
Expires: 2017-06-27
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method of allocating memory (16) in a multithreaded (parallel) computing environment in which threads (30-33) running in parallel within a process are associated with one of a number of memory pools (24, 38-40) of a system memory. The method includes the steps of establishing memory pools in the system memory, mapping each thread to one of the memory pools; and, for each thread, dynamically allocating user memory blocks from the associated memory pool. The method allows any existing memory management malloc (memory allocation) package to be converted to a multithreaded version so that multithreaded processes are run with greater efficiency.

Inventors

  • 👤 Gregory Nakhimovsky

Bibliographic Details

Application Number —
Jurisdiction EP
Data Source google_patents
Last Synchronized 2026-11-05 23:07
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/50; G06F9/5005; G06F9/5011; G06F9/5016; G06F12/00; G06F12/02; G06F12/0223; G06F12/023; Y; Y10; Y10S; Y10S707/00; Y10S707/99951; Y10S707/99952; Y10S707/99953; Y10S707/99956

Claims Analysis

Total Claims: 21
Claim 1
Independent Claim 68 words
A method of allocating memory in a multithreaded computing environment in which a plurality of threads run in parallel within a process, each thread having access to a system memory, the method comprising: establishing a plurality of memory pools in the system memory; mapping each thread to one of said plurality of memory pools; and for each thread, dynamically allocating user memory blocks from the associated memory pool.
Claim 2
Dependent Claim 26 words
The method of claim 1 wherein the step of dynamically allocating memory blocks includes designating the number of bytes in the block desired to be allocated.
Claim 3
Dependent Claim 20 words
The method of claim 1 further comprising the step of preventing simultaneous access to a memory pool by different threads.
Claim 4
Dependent Claim 26 words
The method of claim 1 further comprising the step of establishing a memory pool for each thread comprises allocating a memory buffer of a preselected size.
Claim 5
Dependent Claim 37 words
The method of claim 4 further comprising the step of dynamically increasing the size of the memory pool by allocating additional memory from the system memory in increments equal to the preselected size of the buffer memory.
Claim 6
Dependent Claim 15 words
The method of claim 4 wherein the preselected size of the buffer is 64 Kbytes.
Claim 7
Dependent Claim 29 words
The method of claim 1 further comprising the step of one of the threads transferring memory from the memory pool of another of the threads to its memory pool.
Claim 8
Dependent Claim 27 words
The method of claim 1 wherein each memory pool is defined by an array of static variables identified by a thread index associated with a memory pool.
Claim 9
Dependent Claim 18 words
The method of claim 8 wherein each memory pool is maintained as a data structure of memory blocks.
Claim 10
Dependent Claim 29 words
The method of claim 9 wherein each memory block comprises a header including the size of the memory block and the memory pool index to which it is associated.
Claim 11
Dependent Claim 20 words
The method of claim 10 wherein the size of the block and the memory pool index are each four bytes.
Claim 12
Dependent Claim 20 words
The method of claim 1 further comprising the step of each thread deallocating a memory block to the memory pool.
Claim 13
Dependent Claim 20 words
The method of claim 12 wherein the thread originally allocating the memory block deallocates it to its associated memory pool.
Claim 14
Dependent Claim 23 words
The method of claim 12 further comprising the step of coalescing deallocated memory blocks and preventing coalescing of memory blocks from different pools.
Claim 15
Dependent Claim 24 words
The method of claim 1 further comprising the step of changing the size of an allocated block of memory allocated by a memory pool.
Claim 16
Dependent Claim 95 words
A computer-readable medium storing a computer program which is executable on a computer including a memory, the computer program for allocating memory in a multithreaded computing environment in which a plurality of threads run in parallel within a process, each thread having access to a system memory, the stored program comprising: computer-readable instructions which establish a plurality of memory pools in the system memory; computer-readable instructions which map each thread to one of said plurality of memory pools; and computer-readable instructions which, for each thread, dynamically allocate user memory blocks from the associated memory pool.
Claim 17
Dependent Claim 25 words
The computer-readable medium of claim 16 wherein the stored program further comprises computer instructions which prevent simultaneous access to a memory pool by different threads.
Claim 18
Dependent Claim 36 words
The computer-readable medium of claim 16 wherein the stored program further comprises computer instructions which causes one of the threads to transfer memory from the memory pool of another of the threads to its memory pool.
Claim 19
Dependent Claim 28 words
The computer-readable medium of claim 16 wherein each memory pool is defined by an array of static variables identified by a thread index associated with a memory pool.
Claim 20
Dependent Claim 28 words
The computer-readable medium of claim 16 wherein the stored program further comprises computer instructions which coalesces deallocated memory blocks and prevents coalescing of memory blocks from different pools.
Claim 21
Independent Claim 103 words
A system comprising: memory, a portion of said memory storing a computer program for allocating memory in a multithreaded computing environment in which a plurality of threads run in parallel within a process, each thread having access to the memory, the stored program comprising: computer-readable instructions which establish a plurality of memory pools in the memory; computer-readable instructions which map each thread to one of said plurality of memory pools; and computer-readable instructions which, for each thread, dynamically allocate user memory blocks from the associated memory pool; a processor to execute said computer-readable instructions; and a bus connecting the memory to the processor.

References Cited (Backward Citations)

No citation records indexed.

USPTO Annuity & Maintenance Windows

Maintenance schedule is calculated for granted US utility patents.

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag