demOS

- Main Page
- Modules
- Data Structures
- Files

All Data Structures Files Modules Pages
RING

RINGallocator implements a ring heap where you can allocate buffers of various sizes

You can create as many rings as you want (object oriented implementation)

- new buffers are allocated at the head if enough room available
- allocated buffers can be freed
  - if corresponding buffers are at the tail or head they are effectively freed
  - if not, they are marked as free. They will be effectively freed when the tail or head will reach them (because of other free calls)

In debug mode guards are added in order to check that borders of buffers are not corrupted In debug mode you also have additional services to dump current structure of the heap