~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/array.cc

  • Committer: Nathan Williams
  • Date: 2009-07-02 06:54:37 UTC
  • mfrom: (1085 staging)
  • mto: This revision was merged to the branch mainline in revision 1087.
  • Revision ID: nathanlws@gmail.com-20090702065437-nmgxvuk837rpa3e0
Merged trunk, resolved conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "mysys/mysys_priv.h"
19
19
#include <mystrings/m_string.h>
20
20
 
 
21
#include <algorithm>
 
22
 
 
23
using namespace std;
 
24
 
21
25
/*
22
26
  Initiate dynamic array
23
27
 
46
50
{
47
51
  if (!alloc_increment)
48
52
  {
49
 
    alloc_increment=cmax((8192-MALLOC_OVERHEAD)/element_size,16);
 
53
    alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16U);
50
54
    if (init_alloc > 8 && alloc_increment > init_alloc * 2)
51
55
      alloc_increment=init_alloc*2;
52
56
  }