I'm getting an infinite loop in alloc.c, which is located in
MSL/MSL_C/MSL_Common/Src. This is with CW 9.5. The function is
allocate_from_var_pools. There is a do/while loop that searches for a
block with the required size to allocate a block of memory. I got to this
point through new, not malloc, in my own code. My new requests 16384
floats, which new translates to 65536 (four bytes per float) but which
alloc first converts to 65552 before starting the do/while loop. After
that, the loop starts trying to find a block. In other situations in my
program, this allocation works, but in one reproducible situation the loop
becomes infinite, meaning it neither finds a block, nor ever breaks out
with a failed allocation. It should be noted that there is plenty of free
memory on my computer, and we're only talking about 65k here.
Any thoughts?
________________________________________________________________________
Keith Wiley kwiley DeleteThis @cs.unm.edu
http://www.unm.edu/~keithw
"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
-- Edwin A. Abbott, Flatland
________________________________________________________________________