Home | History | Annotate | Download | only in multiprocessing

Lines Matching refs:block

122         # returns a large enough block -- it might be much larger
134 block = seq.pop()
138 (arena, start, stop) = block
141 return block
143 def _free(self, block):
145 (arena, start, stop) = block
161 block = (arena, start, stop)
165 self._len_to_seq[length].append(block)
167 self._len_to_seq[length] = [block]
170 self._start_to_block[(arena, start)] = block
171 self._stop_to_block[(arena, stop)] = block
173 def _absorb(self, block):
174 # deregister this block so it can be merged with a neighbour
175 (arena, start, stop) = block
181 seq.remove(block)
192 block = self._pending_free_blocks.pop()
195 self._allocated_blocks.remove(block)
196 self._free(block)
198 def free(self, block):
199 # free a block returned by malloc()
204 # immediately, the block is added to a list of blocks to be freed
210 # can't acquire the lock right now, add the block to the list of
212 self._pending_free_blocks.append(block)
217 self._allocated_blocks.remove(block)
218 self._free(block)
223 # return a block of right size (possibly rounded up)
234 block = (arena, start, new_stop)
235 self._allocated_blocks.add(block)
236 return block
248 block = BufferWrapper._heap.malloc(size)
249 self._state = (block, size)
250 util.Finalize(self, BufferWrapper._heap.free, args=(block,))