Shared Persistent Heap Data Environment Manual  1.4.0
sassim.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-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  */
11 
12 #ifndef __SAS_SIM_H
13 #define __SAS_SIM_H
14 
108 #include <stdlib.h>
109 
115 typedef unsigned long sasseg_t;
116 
117 #ifdef __cplusplus
118 #define __C__ "C"
119 #else
120 #define __C__
121 #endif
122 
123 extern __C__ unsigned int
124 SASS2Log2 (unsigned long size);
125 
131 extern __C__ int sasClearOnDealloc;
132 
139 extern __C__ unsigned long getMemLow();
140 
147 extern __C__ unsigned long getMemHigh();
148 
154 extern __C__ void
155 setSASmemrange (unsigned long low, unsigned long high);
156 
167 extern __C__ int
169 
185 extern __C__ void
187 
200 extern __C__ void
202 
228 extern __C__ int SASJoinRegion();
229 
259 extern __C__ int SASJoinRegionByName (const char * store_name);
260 
277 extern __C__ void *SASBlockAlloc (unsigned long blockSize);
278 
288 extern __C__ void SASBlockDealloc (void *blockAddr, unsigned long blockSize);
289 
301 
311 extern __C__ int SASMaxDepthUseMem (void);
312 
327 extern __C__ void SASListFreeRegion ( void **blockAddr,
328  unsigned long *blockSize,
329  int *count);
330 
346 extern __C__ void SASListAllocatedRegion (void **blockAddr,
347  unsigned long *blockSize,
348  int *count);
349 
363 extern __C__ void SASListInUseMem (void **blockAddr, unsigned long *blockSize,
364  int *count);
365 
381 extern __C__ void SASListFreeMem (void **blockAddr, unsigned long *blockSize,
382  int *count);
383 
399 extern __C__ void SASListUncommittedMem (void **blockAddr, unsigned long *blockSize,
400  int *count);
401 
410 extern __C__ unsigned int SASAnchorFreeSpace();
411 
420 extern __C__ void SASReset();
421 
427 extern __C__ void SASSeize();
428 
432 extern __C__ void SASRelease();
433 
443 extern __C__ void SASResetSem();
444 
455 extern __C__ void SASCleanUp ();
456 
466 extern __C__ void SASThreadSetUp ();
467 
475 extern __C__ void SASThreadCleanUp ();
476 
484 extern __C__ void SASRemove();
485 
501 extern __C__ void setSASFinder (void *);
502 
508 extern __C__ void *getSASFinder();
509 
510 #endif /* __SAS_SIM_H */
511 
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
__C__ int SASMaxDepthUseMem(void)
Return the maximum depth for the tree tracking allocated blocks.
__C__ void SASBlockDealloc(void *blockAddr, unsigned long blockSize)
Deallocate a block of memory within SAS Storage.
__C__ void * getSASFinder()
Get the SAS finder address.
__C__ void setSASmemrange(unsigned long low, unsigned long high)
Set the Region's low/high memory address for testing.
__C__ unsigned int SASAnchorFreeSpace()
Get the current number of free bytes within the Anchor blocks internal heap.
__C__ void SASCleanUp()
Process wide cleanup for the SAS runtime. +* +*.
__C__ void setSASFinder(void *)
Sets the SAS finder pointer to a SAS block or utility object.
__C__ int SASJoinRegionByName(const char *store_name)
Join this process to a named SAS Region.
__C__ void setSASLinearUseList(void)
Set UseList tracking to Linear mode.
__C__ void SASListInUseMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated block addresses and sizes.
__C__ void SASRemove()
Remove the SAS Region.
__C__ void SASReset()
Reset the SAS Region back to initial state.
__C__ void SASResetSem()
Reset the internal Semaphores used by Seize/Release the SAS lock manager.
__C__ void SASListUncommittedMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently uncommitted block addresses and sizes.
__C__ unsigned long getMemHigh()
Get the Region's highest memory address.
__C__ void * SASBlockAlloc(unsigned long blockSize)
Allocate a block of memory within SAS Storage.
unsigned long sasseg_t
SAS segment ID.
Definition: sassim.h:115
__C__ void SASThreadCleanUp()
Thread specific cleanup for secondary thread accessing the SAS region.
__C__ void setSASCompactUseList(void)
Set UseList tracking to Compact mode.
__C__ void SASRelease()
Release the anchor block master lock.
__C__ void SASListFreeMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of freed block addresses and sizes.
__C__ int getSASUseListFlag(void)
Get UseList tracking mode flag.
__C__ void SASListFreeRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently free segment block addresses and sizes.
__C__ int SASMaxDepthAllocatedRegion(void)
Return the maximum depth for the tree tracking allocated Region segments.
__C__ unsigned long getMemLow()
Get the Region's lowest memory address.
__C__ void SASThreadSetUp()
Thread specific setup for secondary thread accessing the SAS region.
__C__ void SASSeize()
Seize the anchor block master lock.
__C__ void SASListAllocatedRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated segment block addresses and sizes.
__C__ int sasClearOnDealloc
SAS clear on block deallocate flag.
__C__ int SASJoinRegion()
Join this process to a SAS Region.