mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
cuse(3): Allow allocating a memory buffer of exactly 2 GBytes.
The manual page date will be bumped separately. MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
d14b53ee31
commit
58a8f6e9ec
|
@ -114,7 +114,7 @@ See
|
|||
for known error codes.
|
||||
.Sh LIBRARY USAGE
|
||||
.Ft "void *"
|
||||
.Fn "cuse_vmalloc" "int size"
|
||||
.Fn "cuse_vmalloc" "unsigned size"
|
||||
This function allocates
|
||||
.Ar size
|
||||
bytes of memory.
|
||||
|
|
|
@ -54,7 +54,7 @@ struct cuse_methods {
|
|||
int cuse_init(void);
|
||||
int cuse_uninit(void);
|
||||
|
||||
void *cuse_vmalloc(int);
|
||||
void *cuse_vmalloc(unsigned);
|
||||
int cuse_is_vmalloc_addr(void *);
|
||||
void cuse_vmfree(void *);
|
||||
unsigned long cuse_vmoffset(void *ptr);
|
||||
|
|
|
@ -163,7 +163,7 @@ cuse_vmoffset(void *_ptr)
|
|||
}
|
||||
|
||||
void *
|
||||
cuse_vmalloc(int size)
|
||||
cuse_vmalloc(unsigned size)
|
||||
{
|
||||
struct cuse_alloc_info info;
|
||||
unsigned long pgsize;
|
||||
|
@ -174,7 +174,7 @@ cuse_vmalloc(int size)
|
|||
int error;
|
||||
|
||||
/* some sanity checks */
|
||||
if (f_cuse < 0 || size < 1 || (unsigned long)size > CUSE_ALLOC_BYTES_MAX)
|
||||
if (f_cuse < 0 || size < 1 || size > CUSE_ALLOC_BYTES_MAX)
|
||||
return (NULL);
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
|
Loading…
Reference in a new issue