Inheritance and Memory Allocation

Inheritance and Memory Allocation

Question:
I can’t create an instance of the derived class using operator new. The base and the derived classes differ only by a virtual function. The error messages I receive at runtime asks me to specify the path for files like:

new.asm, strncpy.asm

Answer:
You didn’t mention what compiler you’re using but it sounds like you’re attempting to step into the implementation code of operator new using Visual C++ debugger. Normally, you don’t need to do that. Simply use the “step over” command to exit from it. Instead, set a break point in constructor of the class whose instance you’re attempting to create.

You should note that many time-critical, low-level functions like memcpy, strncpy, memset etc. are written in assembly. When the compiler sees a call of such a function, it inserts its assembly code inline (rather than actually calling a function). When you try to step into the called function, the debugger needs to know where the assembly source files of these functions are located. You can find them in the Visual C++ installation CD (simply run a search to locate these files and then direct the debugger to look for them on the CD).

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved