Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » MemoryBreakpoint definition?
MemoryBreakpoint definition? [message #16276] Thu, 05 June 2008 17:14 Go to next message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

I've successfully extracted the Vector class from Ultimate++, but ran into a problem in App.cpp. As of revision 279, MemoryBreakpoint is only defined (in heapdbg.cpp) if HEAPDBG and UPP_HEAP are defined. But, in App.cpp, MemoryBreakpoint is used if UPP_HEAD and _DEBUG are defined.

Of course, changing:
#if defined(_DEBUG) && defined(UPP_HEAP)

to:
#if defined(_DEBUG) && defined(HEAPDBG) && defined(UPP_HEAP)

fixes the problem.

Is HEAPDBG automatically set on DEBUG builds?



a3e77f341aa1d91d0388a0c8b786e8b5

[Updated on: Thu, 05 June 2008 17:15]

Report message to a moderator

Re: MemoryBreakpoint definition? [message #16277 is a reply to message #16276] Thu, 05 June 2008 17:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am not quite sure how is MemoryBreakpoint related to extracting Vector Smile

Anyway, yes, it is defined/required in debug.

It works like this: Each allocation with U++ allocator has a serial number. If you leak (or heap gets corrupted), you are provided with this serial in the .log.

You can then set MemoryBreakpoint, using this serial, to catch the source of the leak (it segfaults when it is done, so you can catch it in debugger and see backtrace). In App.cpp it referenced because you can setup MemoryBreakpoint using commandline.

Anyway, I think that for extracting Vector, it is mostly irrelevant.

Mirek
Re: MemoryBreakpoint definition? [message #16328 is a reply to message #16277] Sun, 08 June 2008 06:44 Go to previous message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

luzr wrote on Thu, 05 June 2008 10:58

I am not quite sure how is MemoryBreakpoint related to extracting Vector Smile



Extract may have been a bad choice of words. I copied every file required to compile vcont.cpp. App.cpp happened to be one of those files. I need to go back an remove any unused source files; that's the easy part though.

Quote:

Anyway, yes, it is defined/required in debug.



That would explain it then. Thanks.


a3e77f341aa1d91d0388a0c8b786e8b5

[Updated on: Sun, 08 June 2008 06:45]

Report message to a moderator

Previous Topic: how can i use iterators with NTL?
Next Topic: A way to change what represents
Goto Forum:
  


Current Time: Sat May 04 22:55:12 CEST 2024

Total time taken to generate the page: 0.02514 seconds