physfs.h
changeset 843 9718b7ac2573
parent 831 da5b8877b59d
child 865 616d4f93a5e9
equal deleted inserted replaced
842:bffd13779a6b 843:9718b7ac2573
  1946  * \brief Hook your own allocation routines into PhysicsFS.
  1946  * \brief Hook your own allocation routines into PhysicsFS.
  1947  *
  1947  *
  1948  * (This is for limited, hardcore use. If you don't immediately see a need
  1948  * (This is for limited, hardcore use. If you don't immediately see a need
  1949  *  for it, you can probably ignore this forever.)
  1949  *  for it, you can probably ignore this forever.)
  1950  *
  1950  *
  1951  *  !!! FIXME: don't promise C runtime malloc.
  1951  * By default, PhysicsFS will use whatever is reasonable for a platform
  1952  *
  1952  *  to manage dynamic memory (usually ANSI C malloc/realloc/calloc/free, but
  1953  * By default, PhysicsFS will use ANSI C malloc/realloc/calloc/free calls
  1953  *  some platforms might use something else), but in some uncommon cases, the
  1954  *  to manage dynamic memory, but in some uncommon cases, the app might want
  1954  *  app might want more control over the library's memory management. This
  1955  *  more control over the library's memory management. This lets you redirect
  1955  *  lets you redirect PhysicsFS to use your own allocation routines instead.
  1956  *  physfs to use your own allocation routines instead. You can only call this
  1956  *  You can only call this function before PHYSFS_init(); if the library is
  1957  *  function before PHYSFS_init(); if the library is initialized, it'll
  1957  *  initialized, it'll reject your efforts to change the allocator mid-stream.
  1958  *  reject your efforts to change the allocator mid-stream. You may call this
  1958  *  You may call this function after PHYSFS_deinit() if you are willing to
  1959  *  function after PHYSFS_deinit() if you are willing to shutdown the library
  1959  *  shut down the library and restart it with a new allocator; this is a safe
  1960  *  and restart it with a new allocator; this is a safe and supported
  1960  *  and supported operation. The allocator remains intact between deinit/init
  1961  *  operation. The allocator remains intact between deinit/init calls.
  1961  *  calls. If you want to return to the platform's default allocator, pass a
  1962  *  If you want to return to the default allocator, pass a NULL in here.
  1962  *  NULL in here.
  1963  *
  1963  *
  1964  * If you aren't immediately sure what to do with this function, you can
  1964  * If you aren't immediately sure what to do with this function, you can
  1965  *  safely ignore it altogether.
  1965  *  safely ignore it altogether.
  1966  *
  1966  *
  1967  *    \param allocator Structure containing your allocator's entry points.
  1967  *    \param allocator Structure containing your allocator's entry points.