The present invention is directed to a method and system for minimizing
memory access latency during realtime processing. The method includes a
mechanism for marking information that will be accessed during realtime
processing. The marked information may include code, data, heaps, stacks,
as well as other information. The method includes support for locking
down all of the marked information so that it is present in a computing
machine's physical memory so that no page faults will be incurred during
realtime processing. The method additionally enables realtime processing
code to allocate and free memory in a non-blocking manner. It does so by
enabling the creation of heaps for use during realtime processing,
wherein each heap supports allocating and freeing memory in a
non-blocking fashion. Each heap tracks freed memory blocks using
individual non-blocking tracking lists for each memory block size
supported by that heap. If a memory allocation request to a heap can be
satisfied by using a memory block available on one of the lists of freed
memory blocks, the method includes allocating the available memory block
by popping the memory block from the tracking list. If no freed memory
blocks of the desired size are available, then the method includes
traversing a separate set of source memory blocks for that heap, and
making the allocation in a non-blocking fashion from one of those blocks.