[Insight-users] Changed behaviour using linux kernel 2.6.7 vs.
2.4.21
Luis Ibanez
luis.ibanez at kitware.com
Mon Aug 9 18:47:08 EDT 2004
Hi Robert,
It is very easy to check whether this is an
ITK problem or a Kernel problem, or a compiler problem.
Chances are that this is a mismatch between your new Kernel
and the C++ libraries of your compiler.
Simply compile the following program
#include <iostream>
int main(int argc, char *argv[])
{
char * mem = new char[ atoi( argv[1] ) ];
if( mem )
{
std::cout << "Don't worry, be happy" << std::endl;
delete [] mem;
}
else
{
std::cout << "You are asking too much from life" << std::endl;
}
return 0;
}
run it by passing larger and larger numbers as arguments
until you find the allocation limitation of our new kernel
+ C++ libraries.
It should in fact throw and exception when it is not able
to allocate enough memory, so you probably want to put a
try/catch block around that "new" statement.
Please let us know how far you can get in memory allocation
with this program.
Thanks
Luis
PS:
Murphy's Laws state clearly that you should *never*
update your Linux Kernel unless you really need it.
-----------------------
Atwood, Robert C wrote:
> Dear itk/ linux-kernel users/developers:
>
> I tried upgrading the linux kernel on the machine, but then my ITK based
> application would throw an exception (unable to allocate memory for
> image) when updating a ShrinkImageFilter , shrink factor 16, original
> image 800x800x512 float -- this works with the 2.4.21 kernel and with
> the new kernel it does not work, either with the exact executable or a
> recompiled executable. I have tried recompiling , even recompiling itk
> (though I suppose that the kernel version should't affect the object
> code ? ) I selected Bigmem = 64 in the 2.6.7, but the 2.4.21 is the
> RedHat version 2.4.21-15.Elsmp, I am unsure what options it is compiled
> with. However, it seems to recognize the 6gb installed memory.
>
>
> Unfortunately I have no idea whether this is an ITK problem or actually
> a linux kernel problem , but I thought people might like to know; if any
> guru has advice I could try some suggested tests to see what the problem
> is -- within reason, as the time spent rebooting repeatedly adds up.
>
> For now, I have just put the old kernel back. I have no urgent reason to
> upgrade.
>
> Hope this information is of some use,
>
> Robert
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list