Blame include/memkind/internal/tbb_wrapper.h

Packit Service 724aca
/*
Packit Service 724aca
 * Copyright (C) 2017 - 2019 Intel Corporation.
Packit Service 724aca
 * All rights reserved.
Packit Service 724aca
 *
Packit Service 724aca
 * Redistribution and use in source and binary forms, with or without
Packit Service 724aca
 * modification, are permitted provided that the following conditions are met:
Packit Service 724aca
 * 1. Redistributions of source code must retain the above copyright notice(s),
Packit Service 724aca
 *    this list of conditions and the following disclaimer.
Packit Service 724aca
 * 2. Redistributions in binary form must reproduce the above copyright notice(s),
Packit Service 724aca
 *    this list of conditions and the following disclaimer in the documentation
Packit Service 724aca
 *    and/or other materials provided with the distribution.
Packit Service 724aca
 *
Packit Service 724aca
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
Packit Service 724aca
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
Packit Service 724aca
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
Packit Service 724aca
 * EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
Packit Service 724aca
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Packit Service 724aca
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Packit Service 724aca
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
Packit Service 724aca
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
Packit Service 724aca
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
Packit Service 724aca
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit Service 724aca
 */
Packit Service 724aca
Packit Service 724aca
#pragma once
Packit Service 724aca
#include <memkind.h>
Packit Service 724aca
#include <memkind_deprecated.h>
Packit Service 724aca
Packit Service 724aca
#ifdef __cplusplus
Packit Service 724aca
extern "C" {
Packit Service 724aca
#endif
Packit Service 724aca
Packit Service 724aca
/* dynamically load TBB symbols */
Packit Service 724aca
void load_tbb_symbols(void);
Packit Service 724aca
Packit Service 724aca
/* ops callbacks are replaced by TBB callbacks. */
Packit Service 724aca
void tbb_initialize(struct memkind *kind);
Packit Service 724aca
Packit Service 724aca
/* ptr pointer must come from the valid TBB pool allocation */
Packit Service 724aca
void tbb_pool_free_with_kind_detect(void *ptr);
Packit Service 724aca
Packit Service 724aca
/* ptr pointer must come from the valid TBB pool allocation */
Packit Service 724aca
void *tbb_pool_realloc_with_kind_detect(void *ptr, size_t size);
Packit Service 724aca
Packit Service 724aca
/* ptr pointer must come from the valid TBB pool allocation */
Packit Service 724aca
size_t tbb_pool_malloc_usable_size_with_kind_detect(void *ptr);
Packit Service 724aca
Packit Service 724aca
/* ptr pointer must come from the valid TBB pool allocation */
Packit Service 724aca
struct memkind *tbb_detect_kind(void *ptr);
Packit Service 724aca
Packit Service 724aca
/* update cached stats for TBB (unsupported) */
Packit Service 724aca
int tbb_update_cached_stats(void);
Packit Service 724aca
Packit Service 724aca
/* get allocator stat for TBB (unsupported) */
Packit Service 724aca
int tbb_get_global_stat(memkind_stat_type stat, size_t *value);
Packit Service 724aca
Packit Service 724aca
/* defrag reallocate for TBB (unsupported) */
Packit Service 724aca
void *tbb_pool_defrag_reallocate_with_kind_detect(void *ptr);
Packit Service 724aca
#ifdef __cplusplus
Packit Service 724aca
}
Packit Service 724aca
#endif