void *[] в автоматически выделяемой памяти - это фейл...

This commit is contained in:
Kolan Sh 2011-04-29 21:48:56 +04:00
parent 24aca132c3
commit d8e8aa5962

View File

@ -18,9 +18,9 @@ struct block_s {
struct object_s obj; struct object_s obj;
}; };
struct block_s pool[MAX_I]; static struct block_s pool[MAX_I];
struct block_s *free_pool = NULL, static struct block_s *free_pool = NULL,
*busy_pool = NULL; *busy_pool = NULL;
/* /*
@ -46,8 +46,6 @@ void init()
busy_pool = NULL; busy_pool = NULL;
} }
#define MAX_B (pool + MAX_I * sizeof(struct block_s))
inline void *pool_alloc() inline void *pool_alloc()
{ {
if (!free_pool) if (!free_pool)
@ -101,11 +99,12 @@ inline void pool_free(void *p)
busy_pool = b2; busy_pool = b2;
} }
void *mem[MAX_I];
int main() int main()
{ {
unsigned long long i; unsigned long long i;
void *mem[MAX_I];
init(); init();