include/mempool.h
branchpyrit
changeset 93 96d65f841791
parent 92 9af5c039b678
child 94 4c8abb8977dc
equal deleted inserted replaced
92:9af5c039b678 93:96d65f841791
    39 	{
    39 	{
    40 		typesize = ((sizeof(Type)-1)/align+1)*align;
    40 		typesize = ((sizeof(Type)-1)/align+1)*align;
    41 #ifndef NO_SIMD
    41 #ifndef NO_SIMD
    42 		mem = (Type *)_mm_malloc(size * typesize, align);
    42 		mem = (Type *)_mm_malloc(size * typesize, align);
    43 #else
    43 #else
    44 		mem = (Type *)malloc(inisize * typesize);
    44 		mem = (Type *)malloc(size * typesize);
    45 #endif
    45 #endif
    46 	};
    46 	};
    47 public:
    47 public:
    48 	MemoryPool(const size_t inisize):
    48 	MemoryPool(const size_t inisize):
    49 		cur(0), size(inisize), align(16) { init(); };
    49 		cur(0), size(inisize), align(16) { init(); };