C++ Valgrind抱怨说;“创建系统分区失败”;
我使用Valgrind,得到“创建系统部分失败” 详情如下:C++ Valgrind抱怨说;“创建系统分区失败”;,c++,memory,valgrind,C++,Memory,Valgrind,我使用Valgrind,得到“创建系统部分失败” 详情如下: # valgrind --log-file=pau.val --leak-check=full --error-limit=no --track-origins=yes --show-leak-kinds=all --time-stamp=yes ./rm.pau 63,11,0,0,2 231 Enter DEV Main Proc ! [CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulst
# valgrind --log-file=pau.val --leak-check=full --error-limit=no --track-origins=yes --show-leak-kinds=all --time-stamp=yes ./rm.pau 63,11,0,0,2 231
Enter DEV Main Proc !
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(15
) , pcOptValue(15).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(2) and ulstrlen2(2) acBuffer(51
) , pcOptValue(51).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(8) and ulstrlen2(8) acBuffer(80000001
) , pcOptValue(80000001).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(8) and ulstrlen2(8) acBuffer(50000000
) , pcOptValue(50000000).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(8) and ulstrlen2(8) acBuffer(20000000
) , pcOptValue(20000000).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.
[CGL_SetOSPerformanceOpt]ulstrlen1(6) and ulstrlen2(6) acBuffer(520000
) , pcOptValue(520000).
[CGL_SetOSPerformanceOpt]pcfileName and pcOptValue is same.set_capability: enter
set_capability: uid = 560, gid = 1600
set_capability: getresuid(&uid, &euid, &suid) ret = 0
set_capability: getresgid(&gid, &egid, &sgid) ret = 0
set_capability: uid = 0, euid = 0, suid = 0, gid = 0, egid = 0, sgid = 0
set_capability: getresuid(&uid, &euid, &suid) ret = 0
set_capability: getresgid(&gid, &egid, &sgid) ret = 0
set_capability: uid = 0, euid = 560, suid = 0, gid = 0, egid = 0, sgid = 0
set_capability: set_capability: OK!
++++user input para is: ulSubRack=63, ulSlot=11, ulSubSlot=0, ulCupId=0, ulProcNo=2, ulNetCell=231++++
Finally SYS_PARA config info is:
g_stProcSysPara.ulMemDopraPTSize = 2000000000
g_stProcSysPara.ulMemUserPTSize = 1048576
g_stProcSysPara.ulMemExtraPTSize = 0
g_stProcSysPara.ulMemReservedSize = 4194304
g_stProcSysPara.ulBoxHighMemSize = 1048576
g_stProcSysPara.ulBoxLowMemSize = 1048576
g_stProcSysPara.ulMaxSysMsgUnit = 100000
g_stProcSysPara.ulMaxMsgUnit = 100000
g_stProcSysPara.ulMaxSysMsgs = 5000
g_stProcSysPara.ulMaxRelTimers = 50000
g_stProcSysPara.ulDbLogBufferLen = 1048576
Supported 32 ELF file class: 1!
ENTER VOS_Start.........
[LOG-ERR] File=vos_mempt.c, Line=6939, Module=8472, Errno=10016.
[DOPRA-vosMemPtAlloc]:malloc(2000000000) fail.
[LOG-ERR] File=vos_mempt.c, Line=1199, Module=8472, Errno=10016.
[DOPRA-vosMemPtCreateEx]:pszPtName(SYSPT), alloc memory(2000000000) fail.
[LOG-ERR] File=vos_mempt.c, Line=992, Module=8472, Errno=10016.
[Dopra-vosMemPtCreatePt]:Create Pt SYSPT Failed
[LOG-ERR] File=vos_mempt.c, Line=778, Module=8472, Errno=10016.
[DOPRA-vosMemPtInit]:Create system partion fail. partion size:2000000000
[DOPRA-seqcbInvoke]: vosMemPtInit failed for vos_mempt(ret=555231008).
[DOPRA-VOS_Start]: Unable to load module(s):VOS_DEFAULT_STARTUP_SET.
[VOS_Start] Start up failed!
如果我设置的内存太大,我会感到困惑
以下是顶部的详细信息:
# top
top - 06:28:44 up 10 days, 1:11, 3 users, load average: 3.25, 3.62, 3.60
Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.8%us, 2.1%sy, 0.4%ni, 94.4%id, 0.1%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 24161M total, 8215M used, 15945M free, 479M buffers
Swap: 0M total, 0M used, 0M free, 2568M cached
首先,Valgrind的输出是什么,您的程序的输出是什么?我不认为你显示的任何输出来自Valgrind。关于分配:当你分配内存时,所有的内存必须是连续的,也就是说,它必须是一个块。如果这不可能,那么
malloc
调用将失败。很抱歉,我不理解输出的含义。输出是否表示文件pau.val
?我已将valgrind打印的所有细节粘贴到控制台中(但大部分细节是我的程序日志)。分区还是分区?