My Project
Loading...
Searching...
No Matches
omBin.h
Go to the documentation of this file.
1/*******************************************************************
2 * File: omBin.h
3 * Purpose: declaration of routines related to Bins
4 * Author: obachman (Olaf Bachmann)
5 * Created: 11/99
6 *******************************************************************/
7#ifndef OM_BIN_H
8#define OM_BIN_H
9
10#define omGetAlignedSpecBin(size) _omGetSpecBin(size, 1, 0)
11#define omGetSpecBin(size) _omGetSpecBin(size, 0, 0)
12omBin _omGetSpecBin(size_t size, int align, int track);
13
14#define omUnGetSpecBin(bin_ptr) _omUnGetSpecBin(bin_ptr, 0)
15#define omDeleteSpecBin(bin_ptr) _omUnGetSpecBin(bin_ptr, 1)
16void _omUnGetSpecBin(omBin *bin, int force);
17long omGetUsedBinBytes(void);
18
20void omMergeStickyBinIntoBin(omBin sticky_bin, omBin into_bin);
21
22unsigned long omGetNewStickyBinTag(omBin bin);
23void omSetStickyBinTag(omBin bin, unsigned long sticky);
24void omUnSetStickyBinTag(omBin bin, unsigned long sticky);
25void omDeleteStickyBinTag(omBin bin, unsigned long sticky);
26
27unsigned long omGetNewStickyAllBinTag(void);
28void omSetStickyAllBinTag(unsigned long sticky);
29void omUnSetStickyAllBinTag(unsigned long sticky);
30void omDeleteStickyAllBinTag(unsigned long sticky);
31
32void omPrintBinStats(FILE* fd);
33#define omIsStickyBin(bin) (bin->sticky >= SIZEOF_VOIDP)
34
35/*BEGINPRIVATE*/
36#ifndef OM_NDEBUG
37int omIsKnownTopBin(omBin bin, int normal_bin);
38#endif
39#ifdef OM_HAVE_TRACK
40#define omGetSpecTrackBin(size) _omGetSpecBin(size, 0, 1)
41#endif
42
43#define omIsStaticNormalBin(bin) \
44 ((unsigned long) bin >= ((unsigned long) &om_StaticBin[0]) && \
45 (unsigned long) bin <= ((unsigned long) &om_StaticBin[OM_MAX_BIN_INDEX]))
46#define omIsNormalBin(bin) omIsStaticNormalBin(bin) || omFindInGList(om_SpecBin, next, bin, bin) || omIsStickyBin(bin)
47#define omIsSpecBin(bin) (!omIsStaticNormalBin(bin) && !omIsStickyBin(bin))
48
49#ifdef OM_HAVE_TRACK
50#define omIsStaticTrackBin(bin) \
51 ((unsigned long) bin >= ((unsigned long) &om_StaticTrackBin[0]) && \
52 (unsigned long) bin <= ((unsigned long) &om_StaticTrackBin[OM_MAX_BIN_INDEX]))
53#define omIsTrackBin(bin) omIsStaticTrackBin(bin) || omFindInGList(om_SpecTrackBin, next, bin, bin)
54#else
55#define omIsKnownTopBin(bin, normal_bin) 1
56#define omIsStaticTrackBin(bin) 0
57#define omIsTrackBin(bin) 0
58#endif
59#define omIsStaticBin(bin) omIsStaticNormalBin(bin) || omIsStaticTrackBin(bin)
60/*ENDPRIVATE*/
61
62#endif /* OM_BIN_H */
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
#define omIsKnownTopBin(bin, normal_bin)
Definition: omBin.h:55
void omDeleteStickyBinTag(omBin bin, unsigned long sticky)
Definition: omBin.c:339
void omSetStickyAllBinTag(unsigned long sticky)
Definition: omBin.c:540
omBin _omGetSpecBin(size_t size, int align, int track)
Definition: omBin.c:26
unsigned long omGetNewStickyBinTag(omBin bin)
Definition: omBin.c:221
unsigned long omGetNewStickyAllBinTag(void)
Definition: omBin.c:486
void omSetStickyBinTag(omBin bin, unsigned long sticky)
Definition: omBin.c:237
long omGetUsedBinBytes(void)
Definition: omBin.c:763
void omDeleteStickyAllBinTag(unsigned long sticky)
Definition: omBin.c:570
void omUnSetStickyBinTag(omBin bin, unsigned long sticky)
Definition: omBin.c:260
void omUnSetStickyAllBinTag(unsigned long sticky)
Definition: omBin.c:555
void _omUnGetSpecBin(omBin *bin, int force)
Definition: omBin.c:142
omBin_t * omBin
Definition: omStructs.h:12
int status int fd
Definition: si_signals.h:59
#define omGetStickyBinOfBin(B)
Definition: xalloc.h:247
#define omMergeStickyBinIntoBin(A, B)
Definition: xalloc.h:275
#define omPrintBinStats(F)
Definition: xalloc.h:233