ssm  0.0.2
Runtime Library for the Sparse Synchronous Model
ssm_blob1 Struct Reference

The struct template of a heap-allocated blob. More...

#include <ssm.h>

+ Collaboration diagram for ssm_blob1:

Data Fields

struct ssm_mm mm
 Size-flavored memory management header. More...
 
char payload [SSM_BLOB_SIZE_SCALE]
 Payload of heap-allocated blob. More...
 

Detailed Description

The struct template of a heap-allocated blob.

Blobs are just arbitrary chunks of memory in the heap where any kind of data can be stored, with any layout. Since the memory manager will not scan blobs for pointers, any resources maintained within blobs must be managed via other means.

Though this struct's payload is only declared with 4 bytes, actual heap-allocated blobs may have large payloads. For instance, a 48-byte blob might look like:

struct ssm_blob48 {
struct ssm_mm mm;
};
#define SSM_BLOB_SIZE_SCALE
The size resolution for heap-allocated blobs.
Definition: ssm.h:1067
char payload[SSM_BLOB_SIZE_SCALE]
Payload of heap-allocated blob.
Definition: ssm.h:1095
struct ssm_mm mm
Size-flavored memory management header.
Definition: ssm.h:1094
The memory management metadata "header" for heap-allocated objects.
Definition: ssm.h:254

The memory layout of all blobs is the same save for the size of the payload, so we use this struct definition as the "base case" of blobs.

To allow even larger blobs, the actual size of the payload is divided by SSM_BLOB_SIZE_SCALE while stored in the size field.

Definition at line 1093 of file ssm.h.

Field Documentation

◆ mm

struct ssm_mm mm

Size-flavored memory management header.

Definition at line 1012 of file ssm.h.

◆ payload

char payload[SSM_BLOB_SIZE_SCALE]

Payload of heap-allocated blob.

Definition at line 1095 of file ssm.h.


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