libmkkernel 9.0
Loading...
Searching...
No Matches
Data Structures | Data Fields
MkBufferS Struct Reference

The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPEMore...

#include <kernel_mk.h>

+ Collaboration diagram for MkBufferS:

Data Structures

struct  ilsS
 instance storage predefined More...
 

Data Fields

union { 
 
   struct MkObjectS   obj 
 
super 
 
struct { 
 
   MK_NUM   cursize 
 currently used size (always: cursize < size) More...
 
   enum MkTypeE   type 
 type of the item stored into the data-segment More...
 
var 
 variable part of the instance-data
 
struct { 
 
   union MkBufferU   first 
 POINTER to native data representation (ILS or malloc) More...
 
   MK_NUM   size 
 the size of the data-segment More...
 
   bool   doBufferFree 
 should the data be freed? -> example: pBufferRefInit More...
 
storage 
 
struct MkBufferS::ilsS ils
 ILS = predefined storage used for MkBufferS::storage->first.
 
MK_BINB ils_data [MkBufferS_ils_size]
 ILS storage
 

Detailed Description

The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE

C-Kernel-Details

The ABSTRACT-CLASS MkBufferS is used to store MkTypeE data in an MkBufferS::storage

A new MkBufferS is always preallocated with the predefined ILS-storage (MkBufferS::ils_data), but can switch to a MALLOC-storage if the storage requirements of the user exceed the predefined MkBufferS::ilsS::size.

‍A MkBufferS never run out of storage.

The basic goal of the ILS-storage technology is to minimize the usage of MALLOC, this mean that the MkBufferS::ilsS::size should be large enought to be sufficient for the user needs.

The following conditions must always be met for the ILS memory:

The ABSTRACT-CLASS MkBufferS is missing the ILS-storage, the FINAL-CLASSES are:

MkBuffer64C, MkBuffer256C and MkBuffer1024C

See also
MkBufferListC, MkBufferStreamC

Definition at line 6194 of file kernel_mk.h.

Field Documentation

◆ cursize

MK_NUM MkBufferS::cursize

currently used size (always: cursize < size)

Definition at line 6203 of file kernel_mk.h.

◆ doBufferFree

bool MkBufferS::doBufferFree

should the data be freed? -> example: pBufferRefInit

Definition at line 6210 of file kernel_mk.h.

◆ first

union MkBufferU MkBufferS::first

POINTER to native data representation (ILS or malloc)

Definition at line 6208 of file kernel_mk.h.

◆ ils

struct MkBufferS::ilsS MkBufferS::ils

ILS = predefined storage used for MkBufferS::storage->first.

◆ ils_data

MK_BINB MkBufferS::ils_data[MkBufferS_ils_size]

ILS storage

Definition at line 6218 of file kernel_mk.h.

◆ obj

struct MkObjectS MkBufferS::obj

Definition at line 6197 of file kernel_mk.h.

◆ size

MK_NUM MkBufferS::size

the size of the data-segment

Definition at line 6209 of file kernel_mk.h.

◆ [struct]

struct { ... } MkBufferS::storage

storage part of the instance-data

◆ [union]

union { ... } MkBufferS::super

◆ type

enum MkTypeE MkBufferS::type

type of the item stored into the data-segment

Definition at line 6204 of file kernel_mk.h.

◆ [struct]

struct { ... } MkBufferS::var

variable part of the instance-data


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