~k1n/c-icap/c-icap

Viewing all changes in revision 627.

  • Committer: chtsanti
  • Date: 2012-02-06 17:22:41 UTC
  • Revision ID: svn-v4:a5cfe682-fa50-0410-8a04-e816b4a88288:c-icap-server/trunk:836
Arrays, dynamic arrays and vectors implementation

Arrays and vectors normaly stored on continue blocks of memory
The arrays API design in such way to 

- Fix ci_arrays_* related API to spent less memory to store arrays

- Add support for dynamics arrays 

- Add simple vectors API

- The ci_array, ci_vector and other related objects store the index of array
  in the beggining of allocated memory, and objects at the rear of the
  allocated memory. This is make easier to pop last items of arrays/vectors.
  Arrays and vectors normaly stored on continue blocks of memory which can not 
  grow over a predefined length. They are using pack_allocator for memory 
  managment.
  They are designed in such way avoid multiple calls to system malloc.

- The ci_dyn_array and related objects stored on chains of memory blocks. They 
  are using ci_serial_allocator for memory managment.

- Other minor fixes.

Documentation for new functions exists in array.h file

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: