[llvm-commits] CVS: poolalloc/runtime/PoolAllocator/PoolAllocator.h

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 24 14:45:01 PDT 2003


Changes in directory poolalloc/runtime/PoolAllocator:

PoolAllocator.h added (r1.1)

---
Log message:

new header file


---
Diffs of the changes:  (+40 -0)

Index: poolalloc/runtime/PoolAllocator/PoolAllocator.h
diff -c /dev/null poolalloc/runtime/PoolAllocator/PoolAllocator.h:1.1
*** /dev/null	Fri Oct 24 14:44:26 2003
--- poolalloc/runtime/PoolAllocator/PoolAllocator.h	Fri Oct 24 14:44:16 2003
***************
*** 0 ****
--- 1,40 ----
+ //===- PoolAllocator.h - Pool allocator runtime interface file ------------===//
+ // 
+ //                     The LLVM Compiler Infrastructure
+ //
+ // This file was developed by the LLVM research group and is distributed under
+ // the University of Illinois Open Source License. See LICENSE.TXT for details.
+ // 
+ //===----------------------------------------------------------------------===//
+ //
+ // This file defines the interface which is implemented by the LLVM pool
+ // allocator runtime library.
+ //
+ //===----------------------------------------------------------------------===//
+ 
+ #ifndef POOLALLOCATOR_RUNTIME_H
+ #define POOLALLOCATOR_RUNTIME_H
+ 
+ typedef struct PoolTy {
+   // Data - An implementation specified data pointer.
+   void *Data;
+ 
+   // NodeSize - Keep track of the object size tracked by this pool
+   unsigned NodeSize;
+ 
+   // FreeablePool - Set to false if the memory from this pool cannot be freed
+   // before destroy.
+   //
+   unsigned FreeablePool;
+ } PoolTy;
+ 
+ extern "C" {
+   void poolinit(PoolTy *Pool, unsigned NodeSize);
+   void poolmakeunfreeable(PoolTy *Pool);
+   void pooldestroy(PoolTy *Pool);
+   void *poolalloc(PoolTy *Pool);
+   void poolfree(PoolTy *Pool, char *Node);
+   void* poolallocarray(PoolTy* Pool, unsigned Size);
+ }
+ 
+ #endif





More information about the llvm-commits mailing list