Changes in directory llvm-poolalloc/runtime/SafePoolAllocator:
PageManager.h added (r1.1) --- Log message: *** empty log message *** --- Diffs of the changes: (+40 -0) PageManager.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+) Index: llvm-poolalloc/runtime/SafePoolAllocator/PageManager.h diff -c /dev/null llvm-poolalloc/runtime/SafePoolAllocator/PageManager.h:1.1 *** /dev/null Thu Dec 22 10:51:19 2005 --- llvm-poolalloc/runtime/SafePoolAllocator/PageManager.h Thu Dec 22 10:51:09 2005 *************** *** 0 **** --- 1,40 ---- + //===- PageManager.h - Allocates memory on page boundaries ------*- C++ -*-===// + // + // 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 used by the pool allocator to allocate memory + // on large alignment boundaries. + // + //===----------------------------------------------------------------------===// + + #ifndef PAGEMANAGER_H + #define PAGEMANAGER_H + + /// InitializePageManager - This function must be called before any other page + /// manager accesses are performed. It may be called multiple times. + /// + void InitializePageManager(); + + /// PageSize - Contains the size of the unit of memory allocated by + /// AllocatePage. This is a value that is typically several kilobytes in size, + /// and is guaranteed to be a power of two. + /// + extern unsigned PageSize; + + /// AllocatePage - This function returns a chunk of memory with size and + /// alignment specified by getPageSize(). + void *AllocatePage(); + + /// AllocateNPages - + void *AllocateNPages(unsigned Num); + + /// FreePage - This function returns the specified page to the pagemanager for + /// future allocation. + void FreePage(void *Page); + + #endif _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits