This area is my sharing area. Include some technical/believing/life experiences. Hope you can enjoy with me. God bless you. :)
2007年6月14日 星期四
share memory allocate size 上限?
最近在寫ㄧ個程式, 發現share memory 似乎有aloocate length 上限, 但是似乎沒有return error, 上限似乎是3000 bytes 左右, 超過這個值之後, share memory attach (shmat function call 會失敗?), 目前還要再花一點時間來確認這個問題....
Linux 上面實測不同data type length
Linux 上面實測不同data type length, 利用 stun program 測試的結果
size (bytes)
int: 4
struct sockaddr: 16
struct timeval: 8
UInt128: 16
char: 1
unsigned char: 1
double: 8
typedef unsigned char UInt8: 1
typedef unsigned short UInt16: 2
typedef unsigned int UInt32: 4
typedef unsigned long ULong32: 4
typedef double Double: 8
typedef unsigned long long UInt64: 8
size (bytes)
int: 4
struct sockaddr: 16
struct timeval: 8
UInt128: 16
char: 1
unsigned char: 1
double: 8
typedef unsigned char UInt8: 1
typedef unsigned short UInt16: 2
typedef unsigned int UInt32: 4
typedef unsigned long ULong32: 4
typedef double Double: 8
typedef unsigned long long UInt64: 8
訂閱:
文章 (Atom)