theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MkBufferS Struct Reference

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

#include <LibMkKernel_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 5259 of file LibMkKernel_mk.h.

Field Documentation

◆ cursize

MK_NUM MkBufferS::cursize

currently used size (always: cursize < size)

Definition at line 5270 of file LibMkKernel_mk.h.

◆ doBufferFree

bool MkBufferS::doBufferFree

should the data be freed? -> example: pBufferRefInit

Definition at line 5277 of file LibMkKernel_mk.h.

◆ first

union MkBufferU MkBufferS::first

POINTER to native data representation (ILS or malloc)

Definition at line 5275 of file LibMkKernel_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 5284 of file LibMkKernel_mk.h.

◆ obj

struct MkObjectS MkBufferS::obj

Definition at line 5263 of file LibMkKernel_mk.h.

◆ size

MK_NUM MkBufferS::size

the size of the data-segment

Definition at line 5276 of file LibMkKernel_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 5271 of file LibMkKernel_mk.h.

◆ [struct]

struct { ... } MkBufferS::var

variable part of the instance-data


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