Changeset 7ea1b3a


Ignore:
Timestamp:
Apr 27, 2016, 4:06:50 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
string
Children:
8243cf9
Parents:
41ec71c
Message:

finished translating VbyteSM.h except for malor array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/strings/src/internal/VbyteSM.h

    r41ec71c r7ea1b3a  
    2626
    2727//######################### VbyteHeap #########################
    28 
    2928struct VbyteHeap
    3029{
    31         HandleNode_t Header;
    32 
    3330        int NoOfCompactions;
    3431        int NoOfExtensions;
     
    4037        char_t* EndVbyte;
    4138        void* ExtVbyte;
     39
     40        HandleNode_t Header;
    4241};
    4342
     
    5049void reduce(VbyteHeap* const this, int);
    5150
     51//######################### HandleNode #########################
    5252static inline ctor(HandleNode_t* const this)
    5353{
     
    6868        DeleteNode(this);
    6969}
     70
     71//######################### VbyteHeap #########################
     72static inline ctor(VbyteHeap* const this, int size)
     73{
     74        this->NoOfCompactions = 0;
     75        this->NoOfExtensions = 0;
     76        this->NoOfReductions = 0;
     77
     78        this->InitSize = size;
     79        this->CurrSize = size;
     80
     81        #warning missing malloc
     82        this->StartVbyte = 0;
     83        this->EndVbyte = this->StartVbyte;
     84        this->ExtVbyte = (void*)( this->StartVbyte + this->CurrSize );
     85
     86        ctor(&this->Header);
     87        this->Header.next = &this->Header;
     88        this->Header.previous = &this->Header;
     89}
     90
     91static inline dtor(VbyteHeap* const this)
     92{
     93        free(this->StartVbyte);
     94}
Note: See TracChangeset for help on using the changeset viewer.