×

System and method for memory management using contiguous fixed-size blocks

  • US 6,453,403 B1
  • Filed: 05/19/2000
  • Issued: 09/17/2002
  • Est. Priority Date: 05/19/2000
  • Status: Active Grant
First Claim
Patent Images

1. A method for memory management, the method comprising:

  • receiving a request for allocation of a quantity of contiguous memory blocks from a heap, wherein the heap comprises a plurality of memory blocks, wherein each of the plurality of memory blocks is of a uniform fixed size, wherein each memory block is associated with a status bit, wherein a binary status key stores a value indicating availability for allocation, and wherein the status bit for each of the memory blocks has the value stored in the binary status key if that memory block is available for allocation;

    scanning the heap to find a contiguous sequence of memory blocks of the requested quantity and each of whose status bit has the value from the binary status key which indicates availability for allocation, wherein said scanning further includes beginning from a starting point in the heap indicated by a current block variable and sequentially encountering the memory blocks whose status bit has the value from the binary status key which indicates availability for allocation;

    setting the status bit for each encountered memory block to the logical negative of the value of the binary status key;

    performing garbage collection on the heap if the end of the heap is reached while sequentially encountering the memory blocks, wherein said performing the garbage collection includes;

    setting the status bit for all reachable blocks to the value of the binary status key;

    flipping the value of the binary status key, wherein said flipping the value of the binary status key includes setting the value of the binary status key to its logical negative; and

    setting the starting point to the beginning of the heap; and

    allocating the sequence of memory blocks of the requested quantity.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×