uppsrc_Core_r14616.diff

Proposed patch for uppsrc (since 14616 revision) - Sender Ghost, 06/22/2020 02:04 AM

Download (747 Bytes)

View differences:

uppsrc/Core/Cpu.cpp
181 181
	}
182 182
#endif
183 183
#ifdef PLATFORM_FREEBSD
184
	int64 page_size;
184
	u_int page_size;
185 185
    struct vmtotal vmt;
186 186
	size_t vmt_size, uint_size;
187 187

  
......
190 190

  
191 191
    if(sysctlbyname("vm.vmtotal", &vmt, &vmt_size, NULL, 0) >= 0 &&
192 192
       sysctlbyname("vm.stats.vm.v_page_size", &page_size, &uint_size, NULL, 0) >= 0) {
193
		available = vmt.t_free * page_size;
194
		total = vmt.t_avm * page_size;
193
		available = vmt.t_free * (u_int64_t)page_size;
194
		total = vmt.t_avm * (u_int64_t)page_size;
195 195
		return;
196 196
    }
197 197
#endif