diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-12-30 12:42:18 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-12-30 12:42:18 -0600 |
commit | fd95f9ae75acb674be870e3a92c05816bcbbd819 (patch) | |
tree | d34df38748ca5e93ba645eae411983c56ea5d964 /nuttx/graphics/nxbe | |
parent | 8ca22c23fa3fa96cf661888f6b8a104d4c1cbd1b (diff) | |
download | px4-nuttx-fd95f9ae75acb674be870e3a92c05816bcbbd819.tar.gz px4-nuttx-fd95f9ae75acb674be870e3a92c05816bcbbd819.tar.bz2 px4-nuttx-fd95f9ae75acb674be870e3a92c05816bcbbd819.zip |
NX: Use a consistent allocator in all configurations
Diffstat (limited to 'nuttx/graphics/nxbe')
-rw-r--r-- | nuttx/graphics/nxbe/nxbe_clipper.c | 2 | ||||
-rw-r--r-- | nuttx/graphics/nxbe/nxbe_closewindow.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_clipper.c b/nuttx/graphics/nxbe/nxbe_clipper.c index 1c33dd243..4b7293ae6 100644 --- a/nuttx/graphics/nxbe/nxbe_clipper.c +++ b/nuttx/graphics/nxbe/nxbe_clipper.c @@ -110,7 +110,7 @@ static inline void nxbe_pushrectangle(FAR struct nxbe_clipstack_s *stack, if ((stack->npushed + 1) > stack->mxrects) { - /* No then we will need to reallocate the stack to hole more */ + /* No then we will need to reallocate the stack to hold more */ int mxrects = stack->mxrects ? 2 * stack->mxrects : NX_INITIAL_STACKSIZE; struct nxbe_cliprect_s *newstack; diff --git a/nuttx/graphics/nxbe/nxbe_closewindow.c b/nuttx/graphics/nxbe/nxbe_closewindow.c index e632ebf01..09c47af22 100644 --- a/nuttx/graphics/nxbe/nxbe_closewindow.c +++ b/nuttx/graphics/nxbe/nxbe_closewindow.c @@ -39,11 +39,12 @@ #include <nuttx/config.h> -#include <stdlib.h> #include <assert.h> #include <debug.h> +#include <nuttx/kmalloc.h> #include <nuttx/nx/nxglib.h> + #include "nxbe.h" /**************************************************************************** @@ -77,7 +78,8 @@ * Close an existing window * * Input Parameters: - * wnd - The window to be closed (and deallocated) + * wnd - The window to be closed (and deallocated using the user-space + * allocator) * * Return: * None @@ -131,7 +133,9 @@ void nxbe_closewindow(struct nxbe_window_s *wnd) nxbe_redrawbelow(be, wnd->below, &wnd->bounds); - /* Then discard the window structure */ + /* Then discard the window structure. Here we assume that the user-space + * allocator was used. + */ - free(wnd); + umm_free(wnd); } |