diff options
author | Pavol Rusnak <stick@gk2.sk> | 2017-03-31 02:21:18 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-03-31 13:18:47 +1100 |
commit | 6e6c01b97189a95b59a037fa7dabcf8217f199af (patch) | |
tree | 808fbc586f65e1da9bc0f7da6d7f3b3e27ca4da0 /unix/alloc.c | |
parent | 2460888c7403748dc665e3bb5d2e1a321ded4a35 (diff) | |
download | micropython-6e6c01b97189a95b59a037fa7dabcf8217f199af.tar.gz micropython-6e6c01b97189a95b59a037fa7dabcf8217f199af.zip |
unix: Convert mp_uint_t to size_t in alloc.c.
Diffstat (limited to 'unix/alloc.c')
-rw-r--r-- | unix/alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/alloc.c b/unix/alloc.c index 04c635ee97..54fc1d3c4a 100644 --- a/unix/alloc.c +++ b/unix/alloc.c @@ -49,7 +49,7 @@ typedef struct _mmap_region_t { struct _mmap_region_t *next; } mmap_region_t; -void mp_unix_alloc_exec(mp_uint_t min_size, void **ptr, mp_uint_t *size) { +void mp_unix_alloc_exec(size_t min_size, void **ptr, size_t *size) { // size needs to be a multiple of the page size *size = (min_size + 0xfff) & (~0xfff); *ptr = mmap(NULL, *size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); @@ -65,7 +65,7 @@ void mp_unix_alloc_exec(mp_uint_t min_size, void **ptr, mp_uint_t *size) { MP_STATE_VM(mmap_region_head) = rg; } -void mp_unix_free_exec(void *ptr, mp_uint_t size) { +void mp_unix_free_exec(void *ptr, size_t size) { munmap(ptr, size); // unlink the mmap'd region from the list @@ -93,7 +93,7 @@ void *ffi_closure_alloc(size_t size, void **code); void ffi_closure_free(void *ptr); void *ffi_closure_alloc(size_t size, void **code) { - mp_uint_t dummy; + size_t dummy; mp_unix_alloc_exec(size, code, &dummy); return *code; } |