Changeset c5833e8


Ignore:
Timestamp:
Apr 15, 2016, 12:02:41 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0f9e4403
Parents:
8bb59af
Message:

pre merge

Location:
src/examples/gc_no_raii/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/examples/gc_no_raii/src/gcpointers.c

    r8bb59af rc5833e8  
    11#include "gcpointers.h"
    22
    3 // #include "gc.h"
     3#include "gc.h"
    44#include "internal/collector.h"
    5 // #include "internal/object_header.h"
     5#include "internal/object_header.h"
    66// #include "internal/state.h"
    77
  • src/examples/gc_no_raii/src/vector.h

    r8bb59af rc5833e8  
    99//Declaration
    1010context allocator_c(type T, type allocator_t) {
    11         void reallocate(allocator_t*, size_t);
     11        void realloc(allocator_t*, size_t);
    1212        T* data(allocator_t*);
    1313};
     
    3737void reserve(vector(T, allocator_t)* this, size_t size)
    3838{
    39         reallocate(&this->storage, this->size+1);
     39        realloc(&this->storage, this->size+1);
    4040}
    4141
     
    7272void push_back(vector(T, allocator_t)* this, T value)
    7373{
    74         reallocate(&this->storage, this->size+1);
     74        realloc(&this->storage, this->size+1);
    7575        data(&this->storage)[this->size] = value;
    7676        this->size++;
     
    104104
    105105forall(type T)
    106 void reallocate(heap_allocator(T)* this, size_t size)
     106void realloc(heap_allocator(T)* this, size_t size)
    107107{
    108108        static const size_t GROWTH_RATE = 2;
Note: See TracChangeset for help on using the changeset viewer.