eXtremeDB shared memory mapping

本文详细探讨了在使用ARM目标时,遇到无法映射共享内存段错误的原因及解决策略,包括系统设置、访问权限、历史遗留问题和映射问题等,并提供了针对性的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

unable to map the shared memory segment on the ARM target:

 

1. Different system settings. Please check the SHMMIN/SHMMAXkernel parameters ( /proc/sys/kernel/shmmin and  /proc/sys/kernel/shmmaxif you have proc fs on the target). The parameters should have the appropriatevalue to fit the database.

 

2. Access rights problem. Please make sure you have enoughrights to create files in the directory where eXtremeDB creates key-files forshared memory segments and sync. primitives, and run the shared memory creationprocedures. The default location for these files is the current user’s homedirectory but it could be set to another location because of the absence of ahome directory for the user or if the program uses the EXTREMEDB_DIRenvironment variable.

 

3. Garbage left from a previous attempt to run the program. Incase of failure of the program eXtremeDB has no way to cleanup automatically soyou should use the ipcs/ipcrm utilities or mco_db_kill() to remove garbage leftbehind.

 

4. (most complicated) A mapping problem. You have an IM(In-Memory) package which means that you have the DPTR runtime (unless youchanged to the OFFS runtime, which we think is unlikely.) The DPTR runtimestores direct pointers in the database and this means that the database’ssegments addresses must have the same mapping addresses in all the processaddress spaces connected to the database. To satisfy this requirement, atcreation time eXtremeDB maps the database to the address (given through thehint-field) of a shared memory device, or lets the system to choose theaddress; and then stores the address for later use. Next attempts to connect tothis database will try to map memory segments to the stored address. Sometimesit happens that the address is accessible by a process that creates thedatabase but is not accessible in another process that connects to thedatabase. This can happen because of different memory layouts of the processes,dynamic libraries loaded, other shared memory segments and so on. In this caseit is recommended to try with other values for the hint-address (make itaccessible in all processes that use the database), change the process layout,or switch to the OFFS runtime.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值