A brief file description. More...
#include "ink_platform.h"
#include "ink_defs.h"
#include "ink_apidefs.h"
Go to the source code of this file.
Data Structures | |
union | head_p |
struct | _InkFreeList |
struct | _ink_freelist_list |
struct | InkAtomicList |
Defines | |
#define | INK_QUEUE_LD64(dst, src) (ink_queue_load_64((void *)&(dst), (void *)&(src))) |
#define | INK_QUEUE_LD(dst, src) INK_QUEUE_LD64(dst,src) |
#define | ZERO_HEAD_P(_x) |
#define | FROM_PTR(_x) ((void*)(_x)) |
#define | TO_PTR(_x) ((void*)(_x)) |
#define | INK_ATOMICLIST_EMPTY(_x) (!(TO_PTR(FREELIST_POINTER((_x.head))))) |
Typedefs | |
typedef void * | void_p |
typedef struct _InkFreeList | InkFreeList |
typedef struct _InkFreeList * | PInkFreeList |
typedef struct _ink_freelist_list | ink_freelist_list |
Functions | |
void | ink_queue_load_64 (void *dst, void *src) |
InkFreeList * | ink_freelist_create (const char *name, uint32_t type_size, uint32_t chunk_size, uint32_t alignment) |
inkcoreapi void | ink_freelist_init (InkFreeList **fl, const char *name, uint32_t type_size, uint32_t chunk_size, uint32_t alignment) |
inkcoreapi void * | ink_freelist_new (InkFreeList *f) |
inkcoreapi void | ink_freelist_free (InkFreeList *f, void *item) |
void | ink_freelists_dump (FILE *f) |
void | ink_freelists_dump_baselinerel (FILE *f) |
void | ink_freelists_snap_baseline () |
inkcoreapi void | ink_atomiclist_init (InkAtomicList *l, const char *name, uint32_t offset_to_next) |
inkcoreapi void * | ink_atomiclist_push (InkAtomicList *l, void *item) |
void * | ink_atomiclist_pop (InkAtomicList *l) |
inkcoreapi void * | ink_atomiclist_popall (InkAtomicList *l) |
void * | ink_atomiclist_remove (InkAtomicList *l, void *item) |
Variables | |
inkcoreapi volatile int64_t | fastalloc_mem_in_use |
inkcoreapi volatile int64_t | fastalloc_mem_total |
inkcoreapi volatile int64_t | freelist_allocated_mem |
ink_freelist_list * | freelists |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ink_queue.h.
#define FROM_PTR | ( | _x | ) | ((void*)(_x)) |
Definition at line 123 of file ink_queue.h.
Referenced by ink_atomiclist_init(), ink_atomiclist_popall(), ink_atomiclist_push(), ink_freelist_free(), and ink_freelist_init().
#define INK_ATOMICLIST_EMPTY | ( | _x | ) | (!(TO_PTR(FREELIST_POINTER((_x.head))))) |
Definition at line 199 of file ink_queue.h.
Referenced by aio_queue_req(), aio_thread_main(), ProtectedQueue::dequeue_timed(), AtomicSLL< C, L >::empty(), and EThread::execute().
#define INK_QUEUE_LD | ( | dst, | ||
src | ||||
) | INK_QUEUE_LD64(dst,src) |
Definition at line 78 of file ink_queue.h.
Referenced by ink_atomiclist_pop(), ink_atomiclist_popall(), ink_atomiclist_push(), ink_atomiclist_remove(), ink_freelist_free(), and ink_freelist_new().
#define INK_QUEUE_LD64 | ( | dst, | ||
src | ||||
) | (ink_queue_load_64((void *)&(dst), (void *)&(src))) |
Definition at line 70 of file ink_queue.h.
#define TO_PTR | ( | _x | ) | ((void*)(_x)) |
Definition at line 124 of file ink_queue.h.
Referenced by AtomicSLL< C, L >::head(), ink_atomiclist_pop(), ink_atomiclist_popall(), ink_atomiclist_push(), ink_atomiclist_remove(), ink_freelist_free(), ink_freelist_new(), AtomicSLL< C, L >::next(), and ClusterHandler::protoZombieEvent().
#define ZERO_HEAD_P | ( | _x | ) |
Definition at line 117 of file ink_queue.h.
typedef struct _ink_freelist_list ink_freelist_list |
typedef struct _InkFreeList InkFreeList |
Definition at line 168 of file ink_queue.h.
typedef struct _InkFreeList * PInkFreeList |
Definition at line 168 of file ink_queue.h.
typedef void* void_p |
Definition at line 147 of file ink_queue.h.
inkcoreapi void ink_atomiclist_init | ( | InkAtomicList * | l, | |
const char * | name, | |||
uint32_t | offset_to_next | |||
) |
Definition at line 367 of file ink_queue.cc.
References FROM_PTR, InkAtomicList::head, InkAtomicList::name, and InkAtomicList::offset.
Referenced by aio_init_fildes(), AtomicSLL< C, L >::AtomicSLL(), clusterAPI_init(), ClusterHandler::ClusterHandler(), CongestionDB::CongestionDB(), UnixUDPConnection::init(), CCFailHistoryTestCont::init_events(), ProtectedQueue::ProtectedQueue(), UDPNetHandler::UDPNetHandler(), and UnixUDPConnection::UnixUDPConnection().
void* ink_atomiclist_pop | ( | InkAtomicList * | l | ) |
Definition at line 375 of file ink_queue.cc.
References ADDRESS_OF_NEXT, head_p::data, InkAtomicList::head, INK_QUEUE_LD, InkAtomicList::offset, and TO_PTR.
Referenced by AtomicSLL< C, L >::pop(), and CCFailHistoryTestCont::schedule_event().
inkcoreapi void* ink_atomiclist_popall | ( | InkAtomicList * | l | ) |
Definition at line 401 of file ink_queue.cc.
References ADDRESS_OF_NEXT, head_p::data, FROM_PTR, InkAtomicList::head, INK_QUEUE_LD, InkAtomicList::offset, and TO_PTR.
Referenced by aio_move(), ClusterHandler::build_controlmsg_descriptors(), ClusterHandler::build_freespace_descriptors(), ClusterHandler::build_write_descriptors(), UnixUDPConnection::callbackHandler(), CCFailHistoryTestCont::clear_events(), ProtectedQueue::dequeue_timed(), ClusterHandler::do_open_local_requests(), Log::flush_thread_main(), ClusterAPIPeriodicSM::GetNextSM(), AtomicSLL< C, L >::popall(), ClusterHandler::process_incoming_callouts(), CongestionDB::RunTodoList(), UDPQueue::service(), and UnixUDPConnection::~UnixUDPConnection().
inkcoreapi void* ink_atomiclist_push | ( | InkAtomicList * | l, | |
void * | item | |||
) |
Definition at line 432 of file ink_queue.cc.
References ADDRESS_OF_NEXT, head_p::data, FROM_PTR, InkAtomicList::head, ink_assert, INK_QUEUE_LD, InkAtomicList::offset, and TO_PTR.
Referenced by CongestionDB::addRecord(), aio_queue_req(), UDPConnection::bindToThread(), ClusterHandler::do_open_local_requests(), ProtectedQueue::enqueue(), CCFailHistoryTestCont::init_events(), ClusterProcessor::internal_invoke_remote(), machine_offline_APIcallout(), machine_online_APIcallout(), ClusterProcessor::open_local(), LogFile::preproc_and_try_delete(), ClusterHandler::process_large_control_msgs(), ClusterHandler::process_small_control_msgs(), AtomicSLL< C, L >::push(), CongestionDB::removeAllRecords(), CongestionDB::removeRecord(), revalidateCongestionDB(), UDPQueue::send(), send_machine_online_list(), OutgoingControl::startEvent(), UDPNetProcessorInternal::udp_read_from_net(), ClusterHandler::vcs_push(), and LogFile::write_ascii_logbuffer3().
void* ink_atomiclist_remove | ( | InkAtomicList * | l, | |
void * | item | |||
) |
Definition at line 458 of file ink_queue.cc.
References ADDRESS_OF_NEXT, head_p::data, InkAtomicList::head, ink_assert, INK_QUEUE_LD, InkAtomicList::offset, and TO_PTR.
Referenced by ProtectedQueue::remove(), and AtomicSLL< C, L >::remove().
InkFreeList* ink_freelist_create | ( | const char * | name, | |
uint32_t | type_size, | |||
uint32_t | chunk_size, | |||
uint32_t | alignment | |||
) |
Definition at line 119 of file ink_queue.cc.
References ink_freelist_init().
inkcoreapi void ink_freelist_free | ( | InkFreeList * | f, | |
void * | item | |||
) |
Definition at line 244 of file ink_queue.cc.
References ADDRESS_OF_NEXT, _InkFreeList::alignment, ats_free(), ats_memalign_free(), head_p::data, fastalloc_mem_in_use, FROM_PTR, _InkFreeList::head, ink_fatal(), INK_QUEUE_LD, TO_PTR, _InkFreeList::type_size, and _InkFreeList::used.
Referenced by ClassAllocator< C >::free(), Allocator::free_void(), and ink_freelist_new().
inkcoreapi void ink_freelist_init | ( | InkFreeList ** | fl, | |
const char * | name, | |||
uint32_t | type_size, | |||
uint32_t | chunk_size, | |||
uint32_t | alignment | |||
) |
Definition at line 84 of file ink_queue.cc.
References _InkFreeList::alignment, _InkFreeList::allocated, _InkFreeList::allocated_base, ats_malloc(), ats_memalign(), _InkFreeList::chunk_size, _ink_freelist_list::fl, FROM_PTR, _InkFreeList::head, INK_ALIGN, ink_assert, _InkFreeList::name, _ink_freelist_list::next, _InkFreeList::type_size, _InkFreeList::used, and _InkFreeList::used_base.
Referenced by Allocator::Allocator(), ClassAllocator< C >::ClassAllocator(), ink_freelist_create(), and Allocator::re_init().
inkcoreapi void* ink_freelist_new | ( | InkFreeList * | f | ) |
Definition at line 136 of file ink_queue.cc.
References a, ADDRESS_OF_NEXT, _InkFreeList::alignment, _InkFreeList::allocated, ats_malloc(), ats_memalign(), _InkFreeList::chunk_size, head_p::data, fastalloc_mem_in_use, fastalloc_mem_total, fastmemtotal, fl_memadd, _InkFreeList::head, ink_assert, ink_fatal(), ink_freelist_free(), INK_QUEUE_LD, MEMPROTECT_SIZE, TO_PTR, _InkFreeList::type_size, and _InkFreeList::used.
Referenced by SparseClassAllocator< C >::alloc(), ClassAllocator< C >::alloc(), and Allocator::alloc_void().
void ink_freelists_dump | ( | FILE * | f | ) |
Definition at line 343 of file ink_queue.cc.
References _InkFreeList::allocated, _ink_freelist_list::fl, _InkFreeList::name, _ink_freelist_list::next, _InkFreeList::type_size, and _InkFreeList::used.
Referenced by TrackerContinuation::periodic(), and SignalContinuation::periodic().
void ink_freelists_dump_baselinerel | ( | FILE * | f | ) |
Definition at line 315 of file ink_queue.cc.
References a, _InkFreeList::allocated, _InkFreeList::allocated_base, _ink_freelist_list::fl, _InkFreeList::name, _ink_freelist_list::next, _InkFreeList::type_size, _InkFreeList::used, and _InkFreeList::used_base.
Referenced by TrackerContinuation::periodic().
void ink_freelists_snap_baseline | ( | ) |
Definition at line 299 of file ink_queue.cc.
References _InkFreeList::allocated, _InkFreeList::allocated_base, _ink_freelist_list::fl, _ink_freelist_list::next, _InkFreeList::used, and _InkFreeList::used_base.
Referenced by TrackerContinuation::periodic().
void ink_queue_load_64 | ( | void * | dst, | |
void * | src | |||
) |
Definition at line 69 of file ink_queue_utils.cc.
inkcoreapi volatile int64_t fastalloc_mem_in_use |
Definition at line 54 of file ink_queue.cc.
Referenced by ink_freelist_free(), and ink_freelist_new().
inkcoreapi volatile int64_t fastalloc_mem_total |
Definition at line 55 of file ink_queue.cc.
Referenced by ink_freelist_new().
inkcoreapi volatile int64_t freelist_allocated_mem |
Definition at line 78 of file ink_queue.cc.
Definition at line 76 of file ink_queue.cc.