~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_keycache.c

  • Committer: Brian Aker
  • Date: 2008-07-01 08:15:04 UTC
  • Revision ID: brian@tangent.org-20080701081504-qn3jzgsbb2twnchs
Large file and ftruncate() support

Show diffs side-by-side

added added

removed removed

Lines of Context:
430
430
             ((size_t) blocks * keycache->key_cache_block_size) > use_mem)
431
431
        blocks--;
432
432
      /* Allocate memory for cache page buffers */
433
 
      if ((keycache->block_mem=
434
 
           my_large_malloc((size_t) blocks * keycache->key_cache_block_size,
435
 
                          MYF(0))))
 
433
      if ((keycache->block_mem= malloc((size_t) blocks * keycache->key_cache_block_size)))
436
434
      {
437
435
        /*
438
436
          Allocate memory for blocks, hash_links and hash entries;
441
439
        if ((keycache->block_root= (BLOCK_LINK*) my_malloc(length,
442
440
                                                           MYF(0))))
443
441
          break;
444
 
        my_large_free(keycache->block_mem, MYF(0));
 
442
        free(keycache->block_mem);
445
443
        keycache->block_mem= 0;
446
444
      }
447
445
      if (blocks < 8)
516
514
  keycache->blocks=  0;
517
515
  if (keycache->block_mem)
518
516
  {
519
 
    my_large_free((uchar*) keycache->block_mem, MYF(0));
 
517
    free(keycache->block_mem);
520
518
    keycache->block_mem= NULL;
521
519
  }
522
520
  if (keycache->block_root)
742
740
  {
743
741
    if (keycache->block_mem)
744
742
    {
745
 
      my_large_free((uchar*) keycache->block_mem, MYF(0));
 
743
      free(keycache->block_mem);
746
744
      keycache->block_mem= NULL;
747
745
      my_free((uchar*) keycache->block_root, MYF(0));
748
746
      keycache->block_root= NULL;