Skip to content

Commit e2ab22b

Browse files
committed
vmalloc
1 parent 0de451b commit e2ab22b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kernel-open/common/inc/nv-nanos.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ typedef struct nvidia_event
507507
#define vmalloc(size) kmalloc(size, 0)
508508
#define vzalloc(size) kzalloc(size, 0)
509509
#define ksize(p) objcache_from_object(u64_from_pointer(p), PAGESIZE_2M)->pagesize
510-
#define is_vmalloc_addr(p) false
511-
#define vfree kfree
510+
#define is_vmalloc_addr(p) (objcache_from_object(u64_from_pointer(p), PAGESIZE_2M) == INVALID_ADDRESS)
511+
#define vfree NV_KFREE
512512

513513
static inline void *kmalloc(unsigned long size, int flags)
514514
{

kernel-open/nvidia-uvm/uvm_kvmalloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//
4242
// This is in the header so callers can use it to inform their allocation sizes
4343
// if they wish.
44-
#define UVM_KMALLOC_THRESHOLD infinity
44+
#define UVM_KMALLOC_THRESHOLD 16
4545

4646
NV_STATUS uvm_kvmalloc_init(void);
4747
void uvm_kvmalloc_exit(void);

0 commit comments

Comments
 (0)