>>45
http://i.imgur.com/THfSwDv.jpg
問題のexecはstudentmulです
一度にmallocしてるサイズはsizeof
struct game_info{
MYSQL *sql;
pthread_t thread;
long gameid;
char isDone;
};
と
struct id_chain{
long id;
struct idchain *left;
struct idchain *right;
};
なのでだいたい16~24byteくらいかなぁとおもいまふ
小さいmallocを頻繁にするのは良くないっていうのをmallocのソース書いた人が言ってるのですがそれはCPU使用量の話なんですよ
なんどもmalloc&freeするんじゃなくて使い終わったものを再利用するようなコードにしたほうがいいですかね?