New isn't calling the constructor

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gwoplock
Posts: 2
Joined: Wed Apr 10, 2013 3:44 pm

New isn't calling the constructor

Post by gwoplock »

I have been debugging my OS and I have noticed that `new` isn't actually calling the constructor. I found the issue here because the print statement here don't run. My new operator is defined here.

Any help would be appreciated.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: New isn't calling the constructor

Post by Korona »

This is not OS dev related but a basic C++ question. New is calling the default constructor and your printf is inside another constructor.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
gwoplock
Posts: 2
Joined: Wed Apr 10, 2013 3:44 pm

Re: New isn't calling the constructor

Post by gwoplock »

I just noticed that thanks.
Post Reply