NJU-ProjectN / nemu

NJU EMUlator, a full system x86/mips32/riscv32/riscv64 emulator for teaching
Other
858 stars 184 forks source link

编译目标为共享库时无法使用malloc初始化pmem #61

Closed unlsycn closed 1 year ago

unlsycn commented 1 year ago

我不太了解其中的细节。 但是通过printf调试可以发现当nemu作为共享库时无法通过malloc初始化pmem image 可能需要在src/memory/Kconfig添加一行

config PMEM_MALLOC
  depends on !TARGET_SHARE
sashimi-yzh commented 1 year ago

你好, 可以请你帮忙看看malloc的返回值吗?

unlsycn commented 1 year ago

你好, 可以请你帮忙看看malloc的返回值吗?

非常不好意思,调试之后发现这应该是我修改的代码部分有问题,和框架代码无关。