Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolve #18] Add C++ allocator #30

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Apr 2, 2023

  1. Added C++ allocator to manage rdmalib::Buffer

    - An error occurred while linking the `RdmaAllocator` library to the `warm_benchmark` program.
    
    ```
    FAILED: benchmarks/warm_benchmarker
    : && /bin/clang++-15 -Wall -Wextra  -g -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG  CMakeFiles/warm_benchmarker.dir/benchmarks/warm_benchmark.cpp.o CMakeFiles/warm_benchmarker.dir/benchmarks/warm_benchmark_opts.cpp.o -o benchmarks/warm_benchmarker  _deps/spdlog-build/libspdlogd.a  librfaaslib.a  libbenchmarks.a  librfaaslib.a  librdmalib.a  _deps/spdlog-build/libspdlogd.a  /usr/lib/x86_64-linux-gnu/librdmacm.so  /usr/lib/x86_64-linux-gnu/libibverbs.so  -ldl && :
    /bin/ld: /bin/ld: DWARF error: invalid or unhandled FORM value: 0x23
    CMakeFiles/warm_benchmarker.dir/benchmarks/warm_benchmark.cpp.o: in function `main':
    warm_benchmark.cpp:(.text+0x493): undefined reference to `rfaas::RdmaAllocator<rdmalib::Buffer<char> >::allocate(unsigned long const&, int const&, unsigned long)'
    /bin/ld: warm_benchmark.cpp:(.text+0x4e0): undefined reference to `rfaas::RdmaAllocator<rdmalib::Buffer<char> >::allocate(unsigned long const&, int const&, unsigned long)'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    ```
    
    - Checking the argument and parameter types helped resolve the linking error.
    - Inline functions are recommended to be merged into header files to allow for their optimization by the compiler.
    mou authored and mou committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    662d933 View commit details
    Browse the repository at this point in the history
  2. resolve spcl#18 Add C++ allocator (partial)

    - Compiled successfully without any errors.
    - Add allocator implementation in rfaaslib.
    - Encapsulate the memory registration in rdmalib
    - Add test demonstrating standard memory allocation.
    mou authored and mou committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    4105069 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. Modify RdmaAllocator to have a structure similar to the ["C++ named…

    … requirements example for the Allocator"](https://en.cppreference.com/w/cpp/named_req/Allocator).
    
    Signed-off-by: mou <William-Mou>
    mou authored and mou committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    889333e View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. set memory with mmap

    mou authored and mou committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    eb1fe09 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Fixed Allocator to CPP standard version

    mou authored and mou committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    980aa50 View commit details
    Browse the repository at this point in the history
  2. Added construct in rdmaAllocator.hpp

    mou authored and mou committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    1bfd936 View commit details
    Browse the repository at this point in the history
  3. Enable allocation with std::vector

    - Add a `construct` method in `rdmaAllocator.hpp` to enable allocation with std::vector.
    - Test demonstrating standard memory allocation practices.
    - Test demonstrating allocation with our custom allocator.
    - Test demonstrating allocation with std::vector.
    - Improve coding style and adhering to clang-tidy standards.
    
    Signed-off-by: mou <William-Mou>
    mou authored and mou committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    50a2351 View commit details
    Browse the repository at this point in the history