From 8a2c6d3d86df5076510e02315b354b3194e243e1 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 10 Nov 2003 03:42:03 +0000 Subject: "" svn path=/trunk/; revision=1176 --- externals/grill/vasp/source/buflib.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'externals/grill/vasp/source/buflib.cpp') diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp index b3595158..41754a20 100644 --- a/externals/grill/vasp/source/buflib.cpp +++ b/externals/grill/vasp/source/buflib.cpp @@ -26,7 +26,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif -class FreeEntry +class FreeEntry: + public flext { public: FreeEntry(const t_symbol *s): sym(s),nxt(NULL) {} @@ -35,7 +36,8 @@ public: FreeEntry *nxt; }; -class BufEntry +class BufEntry: + public flext { public: BufEntry(const t_symbol *s,I fr,BL zero = true); @@ -68,16 +70,17 @@ static V FreeLibSym(const t_symbol *s); BufEntry::BufEntry(const t_symbol *s,I fr,BL zero): sym(s), - alloc(fr),len(fr),data(new S[fr]), + alloc(fr),len(fr), refcnt(0),nxt(NULL) { + data = (S *)NewAligned(fr*sizeof(S)); if(zero) flext::ZeroMem(data,len*sizeof(*data)); } BufEntry::~BufEntry() { if(sym) FreeLibSym(sym); - if(data) delete[] data; + if(data) FreeAligned(data); } V BufEntry::IncRef() { ++refcnt; } -- cgit v1.2.1