felixpetriconi / allocatorbuilder Goto Github PK
View Code? Open in Web Editor NEWPolicy Based C++ Allocator Library
Policy Based C++ Allocator Library
A simple FreeList is missing. So far is only the SharedFreeList available
Let's imagine, that I have a aligned static buffer in a program (which runs in a process) and I want to initialize a composed allocator (e.g composed of segregator,freelist,bucketizer, fallback) with this static buffer how can I do it?
A. Alexandrescu added certain methods to the interface of the allocators. They are not implemented so far.
The collection of caller statistics is not implemented
Cloned repo, run cmake with:
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake .
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- system
-- thread
-- chrono
-- date_time
-- atomic
-- Found PythonInterp: /usr/sbin/python (found version "3.6.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andreas/build/AllocatorBuilder
And then make:
make
Clang does not build because of incomplete type errors:
Scanning dependencies of target gtest
[ 4%] Building CXX object util/gtest-1.7.0/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 8%] Linking CXX static library libgtest.a
[ 8%] Built target gtest
Scanning dependencies of target gtest_main
[ 13%] Building CXX object util/gtest-1.7.0/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 17%] Linking CXX static library libgtest_main.a
[ 17%] Built target gtest_main
Scanning dependencies of target ALB
[ 21%] Building CXX object source/CMakeFiles/ALB.dir/allocator_base.cpp.o
In file included from /home/andreas/build/AllocatorBuilder/source/allocator_base.cpp:10:
In file included from /home/andreas/build/AllocatorBuilder/source/../alb/allocator_base.hpp:14:
/home/andreas/build/AllocatorBuilder/source/../alb/stl_allocator_adapter.hpp:92:15: error: variable has
incomplete type 'alb::v_100::block'
block pseudoBlock(ptr, n);
^
/home/andreas/build/AllocatorBuilder/source/../alb/internal/traits.hpp:18:12: note: forward declaration of
'alb::v_100::block'
struct block;
^
In file included from /home/andreas/build/AllocatorBuilder/source/allocator_base.cpp:10:
In file included from /home/andreas/build/AllocatorBuilder/source/../alb/allocator_base.hpp:14:
/home/andreas/build/AllocatorBuilder/source/../alb/stl_allocator_adapter.hpp:94:15: error: variable has
incomplete type 'alb::v_100::block'
block realBlock(ptr, *p);
^
/home/andreas/build/AllocatorBuilder/source/../alb/internal/traits.hpp:18:12: note: forward declaration of
'alb::v_100::block'
struct block;
^
2 errors generated.
make[2]: *** [source/CMakeFiles/ALB.dir/build.make:63: source/CMakeFiles/ALB.dir/allocator_base.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:180: source/CMakeFiles/ALB.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
It still builds under gcc but not clang.
The CascadingAllocator is not implemented so far. Only the SharedCascadingAllocator
Add a shared version of the AllocatorWithStats
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.