| 3078 | // Just have something to do... |
| 3079 | int gVerifyVoidCount = 0; |
| 3080 | void VerifyStackRead(int *inBottom, int *inTop) |
| 3081 | { |
| 3082 | #ifdef HXCPP_STACK_UP |
| 3083 | int *start = inTop-1; |
| 3084 | inTop = inBottom+1; |
| 3085 | inBottom = start; |
| 3086 | #endif |
| 3087 | |
| 3088 | int n = inTop - inBottom; |
| 3089 | int check = std::min(n,5); |
| 3090 | for(int c=0;c<check;c++) |
| 3091 | { |
| 3092 | if (inBottom[c]==0) |
| 3093 | gVerifyVoidCount++; |
| 3094 | if (inTop[-1-c]==0) |
| 3095 | gVerifyVoidCount++; |
| 3096 | } |
| 3097 | } |
| 3098 | #endif |
| 3099 | |
| 3100 | // TODO - work out best size based on cache size? |