Is there a limitation of memory size for UDFs?
I defined a UDF, which requires a large portion of memory. static int randn_1[100000] static int randn_2[100000] static int randn_2[100000]
Can I define three integer arraies like this? I think the needed memory size may be too large? |
Re: Is there a limitation of memory size for UDFs?
hi,
If this is a normal variable in C programming, you should refer to the stack size the C compiler permit. Anyway, such a large array definitaion will ocuppy a lot of memory. Why should you do like this? |
Re: Is there a limitation of memory size for UDFs?
I need a list of Gaussian random numbers. I don't want to generate them by my UDF scheme as it may spend long time. I use MatLab to create 100,000 random numbers and read them into memory.
I know this method is awful. FLUENT provides a macro "gauss_random()", but I don't how to use it. |
Re: Is there a limitation of memory size for UDFs?
For large arrays it makes more sense to allocate it on the heap by using a malloc or calloc call.
is do real *mydata; mydata = malloc(size_of_data); mydata[0] = x Greg |
All times are GMT -4. The time now is 08:22. |