FN
Size: a a a
FN
VL
FN
VL
VL
FN
FN
FN
MG
bool SHM_resize(int & fd, size_t size) {
int ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size));
if (ret < 0) {
LOG_ERROR_SHM("ioctl: errno: %d (%s)", errno, strerror(errno));
return false;
}
return true;
}
bool GLIS_shared_memory_realloc(class GLIS_shared_memory & sh, size_t size) {
if (SHM_resize(sh.fd, size)) {
sh.size = size;
return true;
}
return false;
}
D
EB
EB
bool SHM_resize(int & fd, size_t size) {
int ret = TEMP_FAILURE_RETRY(ioctl(fd, ASHMEM_SET_SIZE, size));
if (ret < 0) {
LOG_ERROR_SHM("ioctl: errno: %d (%s)", errno, strerror(errno));
return false;
}
return true;
}
bool GLIS_shared_memory_realloc(class GLIS_shared_memory & sh, size_t size) {
if (SHM_resize(sh.fd, size)) {
sh.size = size;
return true;
}
return false;
}
EB
MG
MG
MG
ЭМ
ЭМ
ЭМ