aix 共享記憶體段問題
關於aix作業系統上 共享記憶體(shared memory)單個段的最大值到底受什麼影響,我從網上搜集了大量的資訊但是沒有一個做明確說明的。根據我的經驗 m85 --aix 4.3.3單段最大值是2G,今天在新的p570上測試,剛開始發現,將我們應用程式的配置引數調整到2G以上,shmget就會報錯。
向我們公司平臺工程師諮詢,看看是不是有哪個引數需要修改,得到的答覆:AIX中沒什麼引數需要修改,最新的作業系統5.3支援超過2G,5.1,5.2沒有查過能不能超過2G。
測試:
增加#include
shmid=shmget(p_key,length,IPC_CREAT|IPC_EXCL|0644);
cout <
發現errno = 22
檢視errno.h:
#define EINVAL 22 /* Invalid argument */
是引數的問題,繼續查詢引數的問題,發現我們的length定義的是int,改為 long 正常了。
(說明:其實同樣的問題,我們在m85上也是做過測試的當時改為long是不行的,後來我們考慮可能有兩方面的原因:
1.我們使用的m85雖然是64位的,但是作業系統的核心是32位的;
2.我們m85上的aix是4.3.3)
問題解決了,在此記錄一下。
附其他errno的解釋,方便以後查詢:
/usr/include/errno.h
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file descriptor */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Resource temporarily unavailable */
#define ENOMEM 12 /* Not enough space */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Improper link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate I/O control operation */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Invalid seek */
#define EROFS 30 /* Read only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Domain error within math function */
#define ERANGE 34 /* Result too large */
#define ENOMSG 35 /* No message of desired type */
#define EIDRM 36 /* Identifier removed */
#define ECHRNG 37 /* Channel number out of range */
#define EL2NSYNC 38 /* Level 2 not synchronized */
#define EL3HLT 39 /* Level 3 halted */
#define EL3RST 40 /* Level 3 reset */
#define ELNRNG 41 /* Link number out of range */
#define EUNATCH 42 /* Protocol driver not attached */
#define ENOCSI 43 /* No CSI structure available */
#define EL2HLT 44 /* Level 2 halted */
#define EDEADLK 45 /* Resource deadlock avoided */
#define ENOTREADY 46 /* Device not ready */
#define EWRPROTECT 47 /* Write-protected media */
#define EFORMAT 48 /* Unformatted media */
#define ENOLCK 49 /* No locks available */
#define ENOCONNECT 50 /* no connection */
#define ESTALE 52 /* no filesystem */
#define EDIST 53 /* old, currently unused AIX errno*/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267897/viewspace-983179/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- aix 共享記憶體段大小限制AI記憶體
- 共享記憶體分段問題記憶體
- linux共享記憶體段研究Linux記憶體
- 【AIX】記憶體AI記憶體
- [20191220]關於共享記憶體段相關問題.txt記憶體
- Linux釋放記憶體及手動釋放Oracle共享記憶體段Linux記憶體Oracle
- 【AIX】AIX記憶體機制AI記憶體
- 在C++Builder中建立共享記憶體段 (轉)C++UI記憶體
- 共享記憶體記憶體
- 共享記憶體段未釋放導致資料庫記憶體被耗盡記憶體資料庫
- [20191223]關於共享記憶體段相關問題3.txt記憶體
- 求助:關於linux下共享記憶體的問題(轉)Linux記憶體
- Golang 共享記憶體Golang記憶體
- POSIX共享記憶體記憶體
- oracle 共享記憶體Oracle記憶體
- aix的記憶體使用AI記憶體
- AIX 記憶體監控AI記憶體
- nginx共享記憶體分析Nginx記憶體
- QT之共享記憶體QT記憶體
- 共享記憶體函式記憶體函式
- shmget() -- 建立共享記憶體記憶體
- SGA與共享記憶體記憶體
- linux共享記憶體Linux記憶體
- SQLServer記憶體問題分析SQLServer記憶體
- 探究 iOS 記憶體問題iOS記憶體
- 記憶體溢位問題記憶體溢位
- oracle for aix記憶體調整OracleAI記憶體
- AIX下程式記憶體分析AI記憶體
- 自動共享記憶體管理 自動記憶體管理 手工記憶體管理記憶體
- [20190104]ipcs檢視共享記憶體段.txt記憶體
- Qt共享記憶體QSharedMemoryQT記憶體
- Linux共享記憶體(二)Linux記憶體
- 修改/dev/shm共享記憶體dev記憶體
- SGA與共享記憶體2記憶體
- 記憶體分配問題處理記憶體
- 排查Java的記憶體問題Java記憶體
- 記憶體溢位的問題記憶體溢位
- aix記憶體最佳化(轉)AI記憶體