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.
When I am trying to override the new() functions etc I am getting an error saying the size parameter should be a 64 bit number even though the custom compiler targets 32bit:
in file included from kernel/src/memory/memorymanagement.cpp:5:
kernel/include/memory/memorymanagement.h:78:7: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
78 | void* operator new(unsigned size);
I am wondering why this happens as when I try to compile it with my dist's gcc it works fine (after passing in the relevant 32bit parms)
maxtyson123 wrote:I am getting an error saying the size parameter should be a 64 bit number
No, you are getting an error saying the size parameter should be size_t. In your chosen ABI, size_t is equivalent to long unsigned int, which means in your chosen ABI, long unsigned int is 32 bits.
Your cross-compiler includes freestanding headers like stddef.h that include the correct definitions for standard types like size_t. Use those headers.