[ADMB Users] memory allocation error
dseiple84 at gmail.com
Tue Feb 28 05:27:32 PST 2012
If you are using gdb in the command line, then to put in a breakpoint you type
so find where ad_exit() is in the code, say it is in ad_exit_file.cpp
at line 300 then you would say
There are other ways but this is the easiest.
Once you run your program and it stops at your breakpoint type in 'bt'
without the quotes (bt for "backtrace"). That will give you a list of
functions: the function you are currently in, the function that called
the function you are in, the one that called that function, ... etc
back to main().
Hope that helps,
On Tue, Feb 28, 2012 at 12:27 AM, Mollie Brooks <mbrooks at ufl.edu> wrote:
> I have a memory allocation error. I found Dave's response to this problem in
> the past.
> However, I was hoping to get some of the gaps filled in.
> Dave says
> "If you compile your program in debug mode and put a breakpoint in
> and do a stack trace you can find the line where this is happening. It may
> be that you are doing something like trying to allocate a vector where
> one of the arguments is uninitialized. "
> Broken down into steps this is:
> (1) compile your program in debug mode
> I know this means to compile code with option -g and execute it as gdb
> --args ./
> (2)put a breakpoint in ad_exit()
> (3)do a stack trace
> Could someone please elaborate on steps (2) and (3) for me?
> Users mailing list
> Users at admb-project.org
More information about the Users