Home | History | Annotate | Download | only in client

Lines Matching defs:Block

20 // block of memory (storing the book-keeping externally). Furthermore this
42 // Allocates a block of memory. If the buffer is out of directly available
47 // size: the size of the memory block to allocate.
50 // the offset of the allocated memory block, or kInvalidOffset if out of
54 // Frees a block of memory.
57 // offset: the offset of the memory block to free.
60 // Frees a block of memory, pending the passage of a token. That memory won't
64 // offset: the offset of the memory block to free.
71 // Gets the size of the largest free block that is available without waiting.
74 // Gets the size of the largest free block that can be allocated if the
75 // caller can wait. Allocating a block of this size will succeed, but may
76 // block.
87 // Status of a block of memory, for book-keeping.
94 // Book-keeping sturcture that describes a block of memory.
95 struct Block {
102 // Comparison functor for memory block sorting.
105 bool operator() (const Block &left, const Block &right) {
110 typedef std::vector<Block> Container;
115 // Gets the index of a memory block, given its offset.
118 // Collapse a free block with its neighbours if they are free. Returns the
119 // index of the collapsed block.
120 // NOTE: this will invalidate block indices.
123 // Waits for a FREE_PENDING_TOKEN block to be usable, and free it. Returns
124 // the new index of that block (since it may have been collapsed).
125 // NOTE: this will invalidate block indices.
128 // Allocates a block of memory inside a given block, splitting it in two
129 // (unless that block is of the exact requested size).
130 // NOTE: this will invalidate block indices.
131 // Returns the offset of the allocated block (NOTE: this is different from
132 // the other functions that return a block index).
151 // Allocates a block of memory. If the buffer is out of directly available
156 // size: the size of the memory block to allocate.
159 // the pointer to the allocated memory block, or NULL if out of
166 // Allocates a block of memory. If the buffer is out of directly available
175 // the pointer to the allocated memory block, or NULL if out of
181 // Frees a block of memory.
184 // pointer: the pointer to the memory block to free.
190 // Frees a block of memory, pending the passage of a token. That memory won't
194 // pointer: the pointer to the memory block to free.
206 // Gets a pointer to a memory block given the base memory and the offset.
213 // Gets the offset to a memory block given the base memory and the address.
222 // Gets the size of the largest free block that is available without waiting.
227 // Gets the size of the largest free block that can be allocated if the