Changeset e681762 in rtems


Ignore:
Timestamp:
11/25/14 15:12:59 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
0a0ded70
Parents:
7e5c9b89
Message:

bdbuf: Use rtems_cache_aligned_malloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    r7e5c9b89 re681762  
    2020 *    issues.
    2121 *
    22  * Copyright (c) 2009-2012 embedded brains GmbH.
     22 * Copyright (c) 2009-2014 embedded brains GmbH.
    2323 */
    2424
     
    4040#include <rtems.h>
    4141#include <rtems/error.h>
    42 #include <rtems/malloc.h>
    4342
    4443#include "rtems/bdbuf.h"
     
    16001599  /*
    16011600   * Allocate memory for buffer memory. The buffer memory will be cache
    1602    * aligned. It is possible to free the memory allocated by rtems_memalign()
    1603    * with free(). Return 0 if allocated.
    1604    *
    1605    * The memory allocate allows a
     1601   * aligned. It is possible to free the memory allocated by
     1602   * rtems_cache_aligned_malloc() with free().
    16061603   */
    1607   if (rtems_memalign ((void **) &bdbuf_cache.buffers,
    1608                       rtems_cache_get_data_line_size(),
    1609                       bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
     1604  bdbuf_cache.buffers = rtems_cache_aligned_malloc(bdbuf_cache.buffer_min_count
     1605                                                   * bdbuf_config.buffer_min);
     1606  if (bdbuf_cache.buffers == NULL)
    16101607    goto error;
    16111608
Note: See TracChangeset for help on using the changeset viewer.