开发者

Resize shared memory

开发者 https://www.devze.com 2022-12-27 23:33 出处:网络
I\'d like开发者_运维问答 to know if there is any way to resize a variable of QSharedMemory (in Qt) once it has been allocated.

I'd like开发者_运维问答 to know if there is any way to resize a variable of QSharedMemory (in Qt) once it has been allocated.

Thanks


I haven't found a way to resize QSharedMemory, but creating a new one isn't very CPU intensive. Unless you're working on a device with very limited memory resources or you need to allocate huge amounts of memory) you should get away with creating larger QSharedMemory and copying data.

The alternative would be to write some kind of segmented QSharedMemory, but try simplest solution first.

0

精彩评论

暂无评论...
验证码 换一张
取 消