Math.h++ Allocates Excessive Memory for Vector, Matrix, and Array Classes

Article ID: 976
Last updated: 29 Jan, 2008
Article ID: 976
Last updated: 29 Jan, 2008
Revision: 1
Views: 4602
Posted: 01 Jul, 1997
by --
Updated: 29 Jan, 2008
by
Problem


This is a known problem with Math.h++ 6.x. A fix for this bug is given below.


Cause


This is a known problem with Math.h++ 6.x. A fix for this bug is given below.


Action


In rw/dataview.cc line 56, change:

 

 data = (void*)the_allocator.allocate( numElements * sizeof(T) ); 

to

 

 data = (void*)the_allocator.allocate( numElements ); 

 

 

 

 


This article was:   Helpful | Not helpful
Report an issue
Article ID: 976
Last updated: 29 Jan, 2008
Revision: 1
Views: 4602
Posted: 01 Jul, 1997 by --
Updated: 29 Jan, 2008 by

Others in this category