Shared Persistent Heap Data Environment Manual  1.1.0
sascompoundheap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2014 IBM Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  * IBM Corporation, Adhemerval Zanella - documentation
11  */
12 
13 #ifndef __SAS_COMPOUND_HEAP_H
14 #define __SAS_COMPOUND_HEAP_H
15 
16 #include "sassimpleheap.h"
17 
119 typedef void *SASCompoundHeap_t;
120 
121 #ifdef __cplusplus
122 #define __C__ "C"
123 #else
124 #define __C__
125 #endif
126 
144 SASCompoundHeapInit (void *heap_block, block_size_t heap_size,
145  block_size_t page_size, int expanding);
146 
160 
171 extern __C__ SASCompoundHeap_t SASCompoundHeapCreate (block_size_t heap_size);
172 
185 SASCompoundHeapCreatePageSize (block_size_t heap_size,
186  block_size_t page_size);
187 
198 SASCompoundFixedHeapCreate (block_size_t heap_size);
199 
209 
216 extern __C__ void
218 
228 
237 extern __C__ block_size_t SASCompoundHeapAllocSize (SASCompoundHeap_t heap);
238 
248 extern __C__ block_size_t SASCompoundHeapFreeSpace (SASCompoundHeap_t heap);
249 
261 extern __C__ block_size_t SASCompoundHeapAllocSpace (SASCompoundHeap_t heap);
262 
273 extern __C__ block_size_t
274 SASCompoundHeapWriteAll (SASCompoundHeap_t heap, int asyncBool);
275 
287 extern __C__ block_size_t
288 SASCompoundHeapPurgeAll (SASCompoundHeap_t heap, int asyncBool);
289 
300 extern __C__ block_size_t SASCompoundHeapReleaseAll (SASCompoundHeap_t heap);
301 
312 extern __C__ block_size_t SASCompoundHeapBringAll (SASCompoundHeap_t heap);
313 
324 extern __C__ block_size_t
326 
337 extern __C__ block_size_t
339 
352 
363 extern __C__ void
365 
376 extern __C__ SASSimpleHeap_t SASCompoundHeapNearAlloc (void *nearObj);
377 
388 extern __C__ void SASCompoundHeapNearDealloc (void *memAddr);
389 
399 
409 extern __C__ block_size_t
411 
422 extern __C__ SASSimpleHeap_t
424 
434 
444 extern __C__ void SASCompoundHeapNearDeallocNoLock (void *memAddr);
445 
455 extern __C__ void
457  SASSimpleHeap_t free_block);
458 
459 #endif /* __SAS_COMPOUND_HEAP_H */
__C__ void SASCompoundHeapNearDealloc(void *memAddr)
Free the allocated SAS Simple Heap based on a contained memAddr.
__C__ SASSimpleHeap_t SASCompoundHeapNearAllocNoLock(void *nearObj)
Allocate a new SAS Simple Heap from SAS Compound Heap nearObj.
__C__ SASSimpleHeap_t SASCompoundHeapAllocNoLock(SASCompoundHeap_t heap)
Sub-Allocate a new SAS Simple Heap from a SAS Compound Heaps internal space.
__C__ void SASCompoundHeapNearDeallocNoLock(void *memAddr)
Free the allocated SAS Simple Heap memAddr from associated SAS Compound Heap.
__C__ void SASCompoundHeapDestroyNoLock(SASCompoundHeap_t heap)
Destroy the SAS Compound Heap heap.
__C__ block_size_t SASCompoundHeapReleaseAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments can be removed from real memory...
__C__ block_size_t SASCompoundHeapBringAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon...
Shared Address Space Simple Heap.
__C__ SASSimpleHeap_t SASCompoundHeapNearAlloc(void *nearObj)
Allocate a new SAS Simple Heap from SAS Compound Heap nearObj.
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
__C__ block_size_t SASCompoundHeapFreeSpace(SASCompoundHeap_t heap)
Return the total available free space on SAS Compound heap heap.
__C__ SASCompoundHeap_t SASCompoundHeapInit(void *heap_block, block_size_t heap_size, block_size_t page_size, int expanding)
Initialize a shared storage as a compound heap.
__C__ block_size_t SASCompoundHeapAllocSize(SASCompoundHeap_t heap)
Return the page size from SAS Compound Heap heap.
__C__ void SASCompoundHeapFree(SASCompoundHeap_t heap, SASSimpleHeap_t free_block)
Free the allocated SAS Simple Heap block in the SAS Compound Heap heap.
__C__ int SASCompoundHeapGetLoadFactor(SASCompoundHeap_t *heap)
Return the load factor from SAS Compound Heap heap.
__C__ block_size_t SASCompoundHeapSeqAccessAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon and will be ac...
__C__ SASCompoundHeap_t SASCompoundHeapExpandCreate(SASCompoundHeap_t heap)
Create an expanding SAS Compound Heap based on existing heap.
__C__ void SASCompoundHeapDestroy(SASCompoundHeap_t heap)
Destroy the SAS Compound Heap heap.
__C__ SASSimpleHeap_t SASCompoundHeapAlloc(SASCompoundHeap_t heap)
Sub-Allocate a new SAS Simple Heap from a SAS Compound Heaps internal space.
__C__ void SASCompoundHeapFreeNoLock(SASCompoundHeap_t heap, SASSimpleHeap_t free_block)
Free the allocated SAS Simple Heap free_block from SAS Compound Heap heap.
__C__ block_size_t SASCompoundHeapPurgeAll(SASCompoundHeap_t heap, int asyncBool)
Write down the SAS Compound Heap to persistent storage and inform the kernel that those pages can be ...
__C__ SASCompoundHeap_t SASCompoundHeapCreatePageSize(block_size_t heap_size, block_size_t page_size)
Create a new SAS Compound Heap with heap_size size and page_size page size.
void * SASSimpleHeap_t
Handle to SAS Simple Space. The type is SAS_RUNTIME_SIMPLEHEAP.
Definition: sassimpleheap.h:34
__C__ SASCompoundHeap_t SASCompoundHeapCreate(block_size_t heap_size)
Create a new SAS Compound Heap with heap_size size.
__C__ void SASCompoundHeapSetLoadFactor(SASCompoundHeap_t *heap, int load)
Set the SAS Compound Heap heap load factor to load.
__C__ block_size_t SASCompoundHeapRandomAccessAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon and will be ac...
__C__ block_size_t SASCompoundHeapFreeSpaceNoLock(SASCompoundHeap_t heap)
Return the total available free space on SAS Compound heap heap.
__C__ block_size_t SASCompoundHeapAllocSpace(SASCompoundHeap_t heap)
Return the total block space allocated to this SAS Compound heap heap.
__C__ SASCompoundHeap_t SASCompoundFixedHeapCreate(block_size_t heap_size)
Create a new non expanding SAS Compound heap with heap_size.
__C__ block_size_t SASCompoundHeapWriteAll(SASCompoundHeap_t heap, int asyncBool)
Write down the SAS Compound Heap to persistent storage.
void * SASCompoundHeap_t
Handle to SAS Compound Heap. The type is SAS_RUNTIME_COMPOUNDHEAP.
Definition: sascompoundheap.h:119