#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "omalloc/omConfig.h"
#include "omalloc/omDerivedConfig.h"
#include "omalloc/omStructs.h"
#include "omalloc/omAllocPrivate.h"
Go to the source code of this file.
◆ _POSIX_SOURCE
◆ INCR_FACTOR
◆ MH_TABLES_C
◆ MIN_BIN_BLOCKS
◆ OM_MAX_BLOCK_SIZE
◆ CreateDenseBins()
Definition at line 78 of file omTables1.c.
79{
80 size_t size, align_size = SIZEOF_OM_ALIGNMENT;
82#ifdef OM_ALIGNMENT_NEEDS_WORK
84#endif
85
90 {
92#ifdef OM_ALIGNMENT_NEEDS_WORK
93 if (
size >= n && align_size != SIZEOF_STRICT_ALIGNMENT)
94 {
95 align_size = SIZEOF_STRICT_ALIGNMENT;
97 }
98#endif
101 {
103 }
104 }
105}
#define SIZEOF_OM_BIN_PAGE
int GetMaxBlockThreshold()
size_t om_BinSize[SIZEOF_OM_BIN_PAGE/MIN_BIN_BLOCKS]
#define OM_MAX_BLOCK_SIZE
◆ GetMaxBlockThreshold()
int GetMaxBlockThreshold |
( |
| ) |
|
Definition at line 65 of file omTables1.c.
66{
69 {
72 }
73
74 printf("error");fflush(stdout);
75 _exit(1);
76}
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 107 of file omTables1.c.
108{
109 int max_bin_index = 0;
110
111#ifdef OM_HAVE_DENSE_BIN_DISTRIBUTION
113#endif
114 for(;;)
115 {
116 max_bin_index++;
118 }
119 {
120
121 printf(
122"#ifndef OM_TABLES_H\n"
123"#define OM_TABLES_H\n"
124"#define OM_MAX_BLOCK_SIZE %d\n"
125"#define OM_MAX_BIN_INDEX %d\n"
126"#define OM_SIZEOF_UNIQUE_MAX_BLOCK_THRESHOLD %d\n"
127"#endif /* OM_TABLES_H */\n"
129 return 0;
130 }
131}
◆ om_BinSize
Initial value:=
{ 8, 12, 16, 20,
24, 28, 32,
40, 48, 56, 64,
80, 96, 112, 128,
160, 192, 224,
Definition at line 50 of file omTables1.c.