阅读背景:

使用大的、连续的2D数组(带有动态内存分配)分割错误

来源:互联网 

The code below is supposed to create two 2D arrays (posa and posb) that have contiguous memory locations, and then copy posa over posb using memmove function. Surprisingly, it works well for "small" array sizes (e.g.: size1=size2=100), but I get a segmentation fault (core dump) for larger sizes (e.g.: size1=size2=300). As I am using dynamic memory allocation, I presume this is not a stack overflow issue like The code below is supposed to create two 2D arr




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: