I have my cuda program in which there are several structure variables allocated. Specifically using the following code for printing the address of each pointer of all the structures of my program allocated on the GPU I have:
I have performed the prints in order. It seems as if the program uses 2 different regions of memory (one region 0x3****** and the other 0x1******) and allocates memory in one of these two regions.
Since the memory is allocated in a synchronous way, why doesn’t the program first allocate structures in one region of the GPU and then in the other, but instead it allocates memory quite alternating the two regions?
I have my cuda program in which there are several structure variables allocated. Specifically using the following code for printing the address of each pointer of all the structures of my program allocated on the GPU I have:
I have performed the prints in order. It seems as if the program uses 2 different regions of memory (one region 0x3****** and the other 0x1******) and allocates memory in one of these two regions.
Since the memory is allocated in a synchronous way, why doesn’t the program first allocate structures in one region of the GPU and then in the other, but instead it allocates memory quite alternating the two regions?
Keep in mind that GPUs (like CPUs) use virtual memory addresses, and so those addresses you print can be mapped to contiguous physical memory regions. Why the driver hand out virtual addresses with different prefixes is anyone’s guess…
Keep in mind that GPUs (like CPUs) use virtual memory addresses, and so those addresses you print can be mapped to contiguous physical memory regions. Why the driver hand out virtual addresses with different prefixes is anyone’s guess…