iPXE
Data Fields
memory_block Struct Reference

A free block of memory. More...

Data Fields

size_t size
 Size of this block. More...
 
char pad [offsetof(struct refcnt, count)+sizeof(((struct refcnt *) NULL) ->count)]
 Padding. More...
 
struct list_head list
 List of free blocks. More...
 

Detailed Description

A free block of memory.

Definition at line 44 of file malloc.c.

Field Documentation

◆ size

size_t memory_block::size

Size of this block.

Definition at line 46 of file malloc.c.

Referenced by alloc_memblock().

◆ pad

char memory_block::pad[offsetof(struct refcnt, count)+ sizeof(((struct refcnt *) NULL) ->count)]

Padding.

This padding exists to cover the "count" field of a reference counter, in the common case where a reference counter is the first element of a dynamically-allocated object. It avoids clobbering the "count" field as soon as the memory is freed, and so allows for the possibility of detecting reference counting errors.

Definition at line 57 of file malloc.c.

◆ list

struct list_head memory_block::list

List of free blocks.

Definition at line 59 of file malloc.c.

Referenced by alloc_memblock(), check_blocks(), free_memblock(), valgrind_make_blocks_defined(), and valgrind_make_blocks_noaccess().


The documentation for this struct was generated from the following file: