Crashing using non-default constructor
Posted: Tue Nov 16, 2010 7:54 am
Hello,
in my kernel there are three classes, which inherit from each other: AMD64RecursiveAddressSpace inherits from AMD64AddressSpace which in turn inherits from AddressSpace. Only AMD64RecursiveAddressSpace has no pure virtual methods and requires a non-default constructor for passing a physical memory manager. But every time I passed a value to it, it died, without any message, even when I changed to a plain integer that is passed. When I change back to a no-argument constructor the kernel does not crash, but the constructor does not seem to be executed (a while(1); does not halt the system). Maybe it should be mentioned that although I linked the kernel to 1MB and identity mapped the first two megs in bootstrap (AMD64), pointers to my objects (no malloc yet!) are always below the 1MB mark, like 0x7FDC8, for some reason. I'm trying to set up interrupts now (I planned to write the code after the memory manager, but set it up first, of cause), seeing if I can get more information about the problem.
Thank you,
Farok
in my kernel there are three classes, which inherit from each other: AMD64RecursiveAddressSpace inherits from AMD64AddressSpace which in turn inherits from AddressSpace. Only AMD64RecursiveAddressSpace has no pure virtual methods and requires a non-default constructor for passing a physical memory manager. But every time I passed a value to it, it died, without any message, even when I changed to a plain integer that is passed. When I change back to a no-argument constructor the kernel does not crash, but the constructor does not seem to be executed (a while(1); does not halt the system). Maybe it should be mentioned that although I linked the kernel to 1MB and identity mapped the first two megs in bootstrap (AMD64), pointers to my objects (no malloc yet!) are always below the 1MB mark, like 0x7FDC8, for some reason. I'm trying to set up interrupts now (I planned to write the code after the memory manager, but set it up first, of cause), seeing if I can get more information about the problem.
Thank you,
Farok