我正在尝试在程序开始时初始化此值。我没有得到期望的值,所以指针可能做错了。
Undefined symbols for architecture x86_64:
"_EVP_aes_256_ctr", referenced from:
_libssh2_crypt_method_aes256_ctr in liblibssh2_sys-8dfe6494e5de1ded.rlib(crypt.o)
"_EVP_aes_192_ctr", referenced from:
_libssh2_crypt_method_aes192_ctr in liblibssh2_sys-8dfe6494e5de1ded.rlib(crypt.o)
"_EVP_aes_128_ctr", referenced from:
_libssh2_crypt_method_aes128_ctr in liblibssh2_sys-8dfe6494e5de1ded.rlib(crypt.o)
ld: symbol(s) not found for architecture x86_64
struct TLBentry{
unsigned int physicalAddress;
unsigned int virtualAddress;
};
struct pageTableEntry{
char validFlag;
char dirty;
unsigned int physicalAddress;
};
print语句应为“ initialize 1”,但其打印为“ initialize 0”
我不知道发生了什么事。
答案 0 :(得分:0)
您知道C中=和==运算符之间的区别吗?您没有为我的PhysicalAddress分配值i,在此行中什么也没做。
entry->physicalAddress == i;
entry->virtualAddress == i;
在这一行中,为什么要打印tlb [1]?您知道数组在C中从0开始吗?
printf("initialize %d\n", memSys->tlb[1].virtualAddress );