mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Remove deprecated APIs to get the total and free memory available to vmm.ko.
These APIs were relevant when memory for virtual machine allocation was hard partitioned away from the rest of the system but that is no longer the case. The sysctls that provided this information were garbage collected a while back. Obtained from: NetApp
This commit is contained in:
parent
452025cfc6
commit
ade4af668a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249905
@ -123,30 +123,6 @@ vm_destroy(struct vmctx *vm)
|
||||
free(vm);
|
||||
}
|
||||
|
||||
size_t
|
||||
vmm_get_mem_total(void)
|
||||
{
|
||||
size_t mem_total = 0;
|
||||
size_t oldlen = sizeof(mem_total);
|
||||
int error;
|
||||
error = sysctlbyname("hw.vmm.mem_total", &mem_total, &oldlen, NULL, 0);
|
||||
if (error)
|
||||
return -1;
|
||||
return mem_total;
|
||||
}
|
||||
|
||||
size_t
|
||||
vmm_get_mem_free(void)
|
||||
{
|
||||
size_t mem_free = 0;
|
||||
size_t oldlen = sizeof(mem_free);
|
||||
int error;
|
||||
error = sysctlbyname("hw.vmm.mem_free", &mem_free, &oldlen, NULL, 0);
|
||||
if (error)
|
||||
return -1;
|
||||
return mem_free;
|
||||
}
|
||||
|
||||
int
|
||||
vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len)
|
||||
{
|
||||
|
@ -45,8 +45,6 @@ enum vm_mmap_style {
|
||||
int vm_create(const char *name);
|
||||
struct vmctx *vm_open(const char *name);
|
||||
void vm_destroy(struct vmctx *ctx);
|
||||
size_t vmm_get_mem_total(void);
|
||||
size_t vmm_get_mem_free(void);
|
||||
int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len);
|
||||
int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s);
|
||||
void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len);
|
||||
|
Loading…
Reference in New Issue
Block a user