diff options
Diffstat (limited to 'vespamalloc/src/vespamalloc')
65 files changed, 88 insertions, 73 deletions
diff --git a/vespamalloc/src/vespamalloc/CMakeLists.txt b/vespamalloc/src/vespamalloc/CMakeLists.txt index 2bbf9e59fec..fc172997214 100644 --- a/vespamalloc/src/vespamalloc/CMakeLists.txt +++ b/vespamalloc/src/vespamalloc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(vespamalloc SOURCES $<TARGET_OBJECTS:vespamalloc_malloc> diff --git a/vespamalloc/src/vespamalloc/malloc/CMakeLists.txt b/vespamalloc/src/vespamalloc/malloc/CMakeLists.txt index 8f8f798e982..f495c242919 100644 --- a/vespamalloc/src/vespamalloc/malloc/CMakeLists.txt +++ b/vespamalloc/src/vespamalloc/malloc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(vespamalloc_malloc OBJECT SOURCES malloc.cpp diff --git a/vespamalloc/src/vespamalloc/malloc/allocchunk.cpp b/vespamalloc/src/vespamalloc/malloc/allocchunk.cpp index daef496d3a7..818a10541ce 100644 --- a/vespamalloc/src/vespamalloc/malloc/allocchunk.cpp +++ b/vespamalloc/src/vespamalloc/malloc/allocchunk.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "allocchunk.h" namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/allocchunk.h b/vespamalloc/src/vespamalloc/malloc/allocchunk.h index 91e05c38658..34636f01fa1 100644 --- a/vespamalloc/src/vespamalloc/malloc/allocchunk.h +++ b/vespamalloc/src/vespamalloc/malloc/allocchunk.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/common.cpp b/vespamalloc/src/vespamalloc/malloc/common.cpp index 4d97aa13b05..d2aca556b5a 100644 --- a/vespamalloc/src/vespamalloc/malloc/common.cpp +++ b/vespamalloc/src/vespamalloc/malloc/common.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "common.h" #include <vespamalloc/util/callstack.h> #include <pthread.h> diff --git a/vespamalloc/src/vespamalloc/malloc/common.h b/vespamalloc/src/vespamalloc/malloc/common.h index 501b45cd067..d81062d7fe3 100644 --- a/vespamalloc/src/vespamalloc/malloc/common.h +++ b/vespamalloc/src/vespamalloc/malloc/common.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <new> diff --git a/vespamalloc/src/vespamalloc/malloc/datasegment.cpp b/vespamalloc/src/vespamalloc/malloc/datasegment.cpp index a7e3a938fca..8cbb37d7ca8 100644 --- a/vespamalloc/src/vespamalloc/malloc/datasegment.cpp +++ b/vespamalloc/src/vespamalloc/malloc/datasegment.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "datasegment.h" #include <algorithm> diff --git a/vespamalloc/src/vespamalloc/malloc/datasegment.h b/vespamalloc/src/vespamalloc/malloc/datasegment.h index a9f5e0046db..0992756ce21 100644 --- a/vespamalloc/src/vespamalloc/malloc/datasegment.h +++ b/vespamalloc/src/vespamalloc/malloc/datasegment.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/freelist.cpp b/vespamalloc/src/vespamalloc/malloc/freelist.cpp index 8c9c4875207..dc784f1b192 100644 --- a/vespamalloc/src/vespamalloc/malloc/freelist.cpp +++ b/vespamalloc/src/vespamalloc/malloc/freelist.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "freelist.hpp" namespace vespamalloc::segment { diff --git a/vespamalloc/src/vespamalloc/malloc/freelist.h b/vespamalloc/src/vespamalloc/malloc/freelist.h index 977252b0a03..d7eca4da235 100644 --- a/vespamalloc/src/vespamalloc/malloc/freelist.h +++ b/vespamalloc/src/vespamalloc/malloc/freelist.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/freelist.hpp b/vespamalloc/src/vespamalloc/malloc/freelist.hpp index 9b18c375804..0e78ddcf65d 100644 --- a/vespamalloc/src/vespamalloc/malloc/freelist.hpp +++ b/vespamalloc/src/vespamalloc/malloc/freelist.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "freelist.h" diff --git a/vespamalloc/src/vespamalloc/malloc/globalpool.cpp b/vespamalloc/src/vespamalloc/malloc/globalpool.cpp index 1d7f63516ca..0c8ecfa77c9 100644 --- a/vespamalloc/src/vespamalloc/malloc/globalpool.cpp +++ b/vespamalloc/src/vespamalloc/malloc/globalpool.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/globalpool.hpp> #include <vespamalloc/malloc/memblock.h> diff --git a/vespamalloc/src/vespamalloc/malloc/globalpool.h b/vespamalloc/src/vespamalloc/malloc/globalpool.h index 807d1498633..fea8f8ffff8 100644 --- a/vespamalloc/src/vespamalloc/malloc/globalpool.h +++ b/vespamalloc/src/vespamalloc/malloc/globalpool.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/globalpool.hpp b/vespamalloc/src/vespamalloc/malloc/globalpool.hpp index 71694b9a653..e68944f118d 100644 --- a/vespamalloc/src/vespamalloc/malloc/globalpool.hpp +++ b/vespamalloc/src/vespamalloc/malloc/globalpool.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "globalpool.h" diff --git a/vespamalloc/src/vespamalloc/malloc/globalpoold.cpp b/vespamalloc/src/vespamalloc/malloc/globalpoold.cpp index 04db8c8ca85..6ac05710188 100644 --- a/vespamalloc/src/vespamalloc/malloc/globalpoold.cpp +++ b/vespamalloc/src/vespamalloc/malloc/globalpoold.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/globalpool.hpp> #include <vespamalloc/malloc/memblockboundscheck_d.h> diff --git a/vespamalloc/src/vespamalloc/malloc/globalpooldst.cpp b/vespamalloc/src/vespamalloc/malloc/globalpooldst.cpp index 9bd960e44f1..8d4824c1126 100644 --- a/vespamalloc/src/vespamalloc/malloc/globalpooldst.cpp +++ b/vespamalloc/src/vespamalloc/malloc/globalpooldst.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/globalpool.hpp> #include <vespamalloc/malloc/memblockboundscheck_dst.h> diff --git a/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.cpp b/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.cpp index 10f7c68f049..955e901581c 100644 --- a/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.cpp +++ b/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "independent_non_inlined_memcpy.h" diff --git a/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.h b/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.h index 0ba05f5383e..a4406b66fe2 100644 --- a/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.h +++ b/vespamalloc/src/vespamalloc/malloc/independent_non_inlined_memcpy.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <cstddef> diff --git a/vespamalloc/src/vespamalloc/malloc/load_as_huge.cpp b/vespamalloc/src/vespamalloc/malloc/load_as_huge.cpp index 431892032ad..531f98b09f4 100644 --- a/vespamalloc/src/vespamalloc/malloc/load_as_huge.cpp +++ b/vespamalloc/src/vespamalloc/malloc/load_as_huge.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "independent_non_inlined_memcpy.h" #include <cstdio> diff --git a/vespamalloc/src/vespamalloc/malloc/malloc.cpp b/vespamalloc/src/vespamalloc/malloc/malloc.cpp index 36912e80768..6c2ae00722c 100644 --- a/vespamalloc/src/vespamalloc/malloc/malloc.cpp +++ b/vespamalloc/src/vespamalloc/malloc/malloc.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/malloc.h> #include <vespamalloc/malloc/memorywatcher.h> #include <vespamalloc/malloc/memblock.h> diff --git a/vespamalloc/src/vespamalloc/malloc/malloc.h b/vespamalloc/src/vespamalloc/malloc/malloc.h index 5def89dcea6..ae37eccf2cd 100644 --- a/vespamalloc/src/vespamalloc/malloc/malloc.h +++ b/vespamalloc/src/vespamalloc/malloc/malloc.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/mallocd.cpp b/vespamalloc/src/vespamalloc/malloc/mallocd.cpp index f54093582b9..683851d5472 100644 --- a/vespamalloc/src/vespamalloc/malloc/mallocd.cpp +++ b/vespamalloc/src/vespamalloc/malloc/mallocd.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/mallocd.h> #include <vespamalloc/malloc/memblockboundscheck_d.h> diff --git a/vespamalloc/src/vespamalloc/malloc/mallocd.h b/vespamalloc/src/vespamalloc/malloc/mallocd.h index 01b120058bb..ac570b05802 100644 --- a/vespamalloc/src/vespamalloc/malloc/mallocd.h +++ b/vespamalloc/src/vespamalloc/malloc/mallocd.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/memblockboundscheck.h> diff --git a/vespamalloc/src/vespamalloc/malloc/mallocdst.h b/vespamalloc/src/vespamalloc/malloc/mallocdst.h index ef7bedd3e58..9c49957b573 100644 --- a/vespamalloc/src/vespamalloc/malloc/mallocdst.h +++ b/vespamalloc/src/vespamalloc/malloc/mallocdst.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/mallocd.h> diff --git a/vespamalloc/src/vespamalloc/malloc/mallocdst16.cpp b/vespamalloc/src/vespamalloc/malloc/mallocdst16.cpp index 03206bcdf90..3869e9c9df3 100644 --- a/vespamalloc/src/vespamalloc/malloc/mallocdst16.cpp +++ b/vespamalloc/src/vespamalloc/malloc/mallocdst16.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/mallocdst.h> namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/mallocdst16_nl.cpp b/vespamalloc/src/vespamalloc/malloc/mallocdst16_nl.cpp index 41f78c5222c..35630af2f92 100644 --- a/vespamalloc/src/vespamalloc/malloc/mallocdst16_nl.cpp +++ b/vespamalloc/src/vespamalloc/malloc/mallocdst16_nl.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/mallocdst.h> namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/memblock.cpp b/vespamalloc/src/vespamalloc/malloc/memblock.cpp index 6851488bf9b..67933863b68 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblock.cpp +++ b/vespamalloc/src/vespamalloc/malloc/memblock.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/memblock.hpp> namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/memblock.h b/vespamalloc/src/vespamalloc/malloc/memblock.h index ee090de6f3d..40e3178bad1 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblock.h +++ b/vespamalloc/src/vespamalloc/malloc/memblock.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/util/callstack.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memblock.hpp b/vespamalloc/src/vespamalloc/malloc/memblock.hpp index c4bef6de99d..6cb11f3f8dc 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblock.hpp +++ b/vespamalloc/src/vespamalloc/malloc/memblock.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/memblock.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.cpp b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.cpp index a0847ef3295..e8ce95d3d95 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.cpp +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #ifndef _VESPAMALLOC_MALLOC_MEMBLOCKBOUNDSCHECK_HPP_ #define _VESPAMALLOC_MALLOC_MEMBLOCKBOUNDSCHECK_HPP_ diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.h b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.h index 67b98701d8e..7af1b12743f 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.h +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/common.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.hpp b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.hpp index 3d06879264c..54b69715905 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.hpp +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/memblockboundscheck.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.cpp b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.cpp index 3ecb2d77030..8f4a31b8107 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.cpp +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/memblockboundscheck_d.h> #include <vespamalloc/malloc/memblockboundscheck.hpp> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.h b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.h index 7bf87f96568..e864839dac0 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.h +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_d.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/memblockboundscheck.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.cpp b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.cpp index 3ed13b184bd..40a4f38efde 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.cpp +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/memblockboundscheck_dst.h> #include <vespamalloc/malloc/memblockboundscheck.hpp> diff --git a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.h b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.h index fa85c9fae83..9b17d2f994c 100644 --- a/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.h +++ b/vespamalloc/src/vespamalloc/malloc/memblockboundscheck_dst.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/memblockboundscheck.h> diff --git a/vespamalloc/src/vespamalloc/malloc/memorywatcher.h b/vespamalloc/src/vespamalloc/malloc/memorywatcher.h index de72f0f3f2e..29b1a34ee4d 100644 --- a/vespamalloc/src/vespamalloc/malloc/memorywatcher.h +++ b/vespamalloc/src/vespamalloc/malloc/memorywatcher.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <stdio.h> diff --git a/vespamalloc/src/vespamalloc/malloc/mmap.cpp b/vespamalloc/src/vespamalloc/malloc/mmap.cpp index c10fea4a535..bee1b9e0231 100644 --- a/vespamalloc/src/vespamalloc/malloc/mmap.cpp +++ b/vespamalloc/src/vespamalloc/malloc/mmap.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <sys/types.h> #include <sys/mman.h> #include <dlfcn.h> diff --git a/vespamalloc/src/vespamalloc/malloc/mmappool.cpp b/vespamalloc/src/vespamalloc/malloc/mmappool.cpp index 849563572e8..cee709ed0ed 100644 --- a/vespamalloc/src/vespamalloc/malloc/mmappool.cpp +++ b/vespamalloc/src/vespamalloc/malloc/mmappool.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mmappool.h" #include "common.h" #include <sys/mman.h> @@ -10,6 +10,8 @@ namespace vespamalloc { MMapPool::MMapPool() : _page_size(getpagesize()), _huge_flags((getenv("VESPA_USE_HUGEPAGES") != nullptr) ? MAP_HUGETLB : 0), + _peakBytes(0ul), + _currentBytes(0ul), _count(0), _mutex(), _mappings() @@ -28,9 +30,13 @@ MMapPool::getNumMappings() const { size_t MMapPool::getMmappedBytes() const { std::lock_guard guard(_mutex); - size_t sum(0); - std::for_each(_mappings.begin(), _mappings.end(), [&sum](const auto & e){ sum += e.second._sz; }); - return sum; + return _currentBytes; +} + +size_t +MMapPool::getMmappedBytesPeak() const { + std::lock_guard guard(_mutex); + return _peakBytes; } void * @@ -76,10 +82,10 @@ MMapPool::mmap(size_t sz) { std::lock_guard guard(_mutex); auto [it, inserted] = _mappings.insert(std::make_pair(buf, MMapInfo(mmapId, sz))); ASSERT_STACKTRACE(inserted); + _currentBytes += sz; + _peakBytes = std::max(_peakBytes, _currentBytes); if (sz >= _G_bigBlockLimit) { - size_t sum(0); - std::for_each(_mappings.begin(), _mappings.end(), [&sum](const auto & e){ sum += e.second._sz; }); - fprintf(_G_logFile, "%ld mappings of accumulated size %ld\n", _mappings.size(), sum); + fprintf(_G_logFile, "%ld mappings of accumulated size %ld\n", _mappings.size(), _currentBytes); } } return buf; @@ -98,6 +104,7 @@ MMapPool::unmap(void * ptr) { } sz = found->second._sz; _mappings.erase(found); + _currentBytes -= sz; } int munmap_ok = ::munmap(ptr, sz); ASSERT_STACKTRACE(munmap_ok == 0); diff --git a/vespamalloc/src/vespamalloc/malloc/mmappool.h b/vespamalloc/src/vespamalloc/malloc/mmappool.h index c14f58ce564..0a3dd5d0a0a 100644 --- a/vespamalloc/src/vespamalloc/malloc/mmappool.h +++ b/vespamalloc/src/vespamalloc/malloc/mmappool.h @@ -1,7 +1,8 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <atomic> +#include <cstdio> #include <mutex> #include <unordered_map> @@ -18,6 +19,7 @@ public: size_t get_size(void *) const; size_t getNumMappings() const; size_t getMmappedBytes() const; + size_t getMmappedBytesPeak() const; void info(FILE * os, size_t level) const; private: struct MMapInfo { @@ -27,6 +29,8 @@ private: }; const size_t _page_size; const int _huge_flags; + size_t _peakBytes; + size_t _currentBytes; std::atomic<size_t> _count; std::atomic<bool> _has_hugepage_failure_just_happened; mutable std::mutex _mutex; diff --git a/vespamalloc/src/vespamalloc/malloc/overload.h b/vespamalloc/src/vespamalloc/malloc/overload.h index e7744f127d0..bf9710b9b32 100644 --- a/vespamalloc/src/vespamalloc/malloc/overload.h +++ b/vespamalloc/src/vespamalloc/malloc/overload.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" @@ -119,7 +119,9 @@ struct mallinfo2 mallinfo2() __THROW { info.smblks = 0; info.hblkhd = vespamalloc::_GmemP->mmapPool().getNumMappings(); info.hblks = vespamalloc::_GmemP->mmapPool().getMmappedBytes(); - info.usmblks = 0; + size_t highwaterMark = vespamalloc::_GmemP->dataSegment().dataSize() + + vespamalloc::_GmemP->mmapPool().getMmappedBytesPeak(); + info.usmblks = highwaterMark; info.fsmblks = 0; info.fordblks = vespamalloc::_GmemP->dataSegment().freeSize(); info.uordblks = info.arena + info.hblks - info.fordblks; @@ -135,7 +137,9 @@ struct mallinfo mallinfo() __THROW { info.smblks = 0; info.hblkhd = vespamalloc::_GmemP->mmapPool().getNumMappings(); info.hblks = (vespamalloc::_GmemP->mmapPool().getMmappedBytes() >> 20); - info.usmblks = 0; + size_t highwaterMark = vespamalloc::_GmemP->dataSegment().dataSize() + + vespamalloc::_GmemP->mmapPool().getMmappedBytesPeak(); + info.usmblks = (highwaterMark >> 20); info.fsmblks = 0; info.fordblks = (vespamalloc::_GmemP->dataSegment().freeSize() >> 20); info.uordblks = info.arena + info.hblks - info.fordblks; diff --git a/vespamalloc/src/vespamalloc/malloc/stat.h b/vespamalloc/src/vespamalloc/malloc/stat.h index b8e51e4ec7b..3cb73518ec8 100644 --- a/vespamalloc/src/vespamalloc/malloc/stat.h +++ b/vespamalloc/src/vespamalloc/malloc/stat.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/threadlist.cpp b/vespamalloc/src/vespamalloc/malloc/threadlist.cpp index c608b92cf00..785aebf1dee 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadlist.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadlist.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadlist.hpp> #include <vespamalloc/malloc/memblock.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadlist.h b/vespamalloc/src/vespamalloc/malloc/threadlist.h index ca3a58483c9..ed24b5b4799 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadlist.h +++ b/vespamalloc/src/vespamalloc/malloc/threadlist.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "threadpool.h" diff --git a/vespamalloc/src/vespamalloc/malloc/threadlist.hpp b/vespamalloc/src/vespamalloc/malloc/threadlist.hpp index e22b93c48fe..095d19159c5 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadlist.hpp +++ b/vespamalloc/src/vespamalloc/malloc/threadlist.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "threadlist.h" diff --git a/vespamalloc/src/vespamalloc/malloc/threadlistd.cpp b/vespamalloc/src/vespamalloc/malloc/threadlistd.cpp index f43b12941f3..31b868e9e71 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadlistd.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadlistd.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadlist.hpp> #include <vespamalloc/malloc/memblockboundscheck_d.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadlistdst.cpp b/vespamalloc/src/vespamalloc/malloc/threadlistdst.cpp index 8f934261175..28280fbf0d2 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadlistdst.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadlistdst.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadlist.hpp> #include <vespamalloc/malloc/memblockboundscheck_dst.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadpool.cpp b/vespamalloc/src/vespamalloc/malloc/threadpool.cpp index ebeb550896d..ada69eec54a 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadpool.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadpool.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadpool.hpp> #include <vespamalloc/malloc/memblock.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadpool.h b/vespamalloc/src/vespamalloc/malloc/threadpool.h index 750833084ca..cb8ecb801e0 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadpool.h +++ b/vespamalloc/src/vespamalloc/malloc/threadpool.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/threadpool.hpp b/vespamalloc/src/vespamalloc/malloc/threadpool.hpp index e62fa0f2fdf..410464ea420 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadpool.hpp +++ b/vespamalloc/src/vespamalloc/malloc/threadpool.hpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespamalloc/malloc/threadpool.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadpoold.cpp b/vespamalloc/src/vespamalloc/malloc/threadpoold.cpp index ad54cf212f2..2588ae52112 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadpoold.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadpoold.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadpool.hpp> #include <vespamalloc/malloc/memblockboundscheck_d.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadpooldst.cpp b/vespamalloc/src/vespamalloc/malloc/threadpooldst.cpp index 6422581601e..d6fdd903c98 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadpooldst.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadpooldst.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadpool.hpp> #include <vespamalloc/malloc/memblockboundscheck_dst.h> #include <vespamalloc/malloc/stat.h> diff --git a/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp b/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp index 4a02d599b63..feaddc4383c 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "threadproxy.h" #include "common.h" diff --git a/vespamalloc/src/vespamalloc/malloc/threadproxy.h b/vespamalloc/src/vespamalloc/malloc/threadproxy.h index 80ec3dadbfe..812da0615a0 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadproxy.h +++ b/vespamalloc/src/vespamalloc/malloc/threadproxy.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "common.h" diff --git a/vespamalloc/src/vespamalloc/util/CMakeLists.txt b/vespamalloc/src/vespamalloc/util/CMakeLists.txt index c622be47a6a..ee08c868cb4 100644 --- a/vespamalloc/src/vespamalloc/util/CMakeLists.txt +++ b/vespamalloc/src/vespamalloc/util/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(vespamalloc_util OBJECT SOURCES callstack.cpp diff --git a/vespamalloc/src/vespamalloc/util/callgraph.h b/vespamalloc/src/vespamalloc/util/callgraph.h index 2d66fc8b717..8a9349069f5 100644 --- a/vespamalloc/src/vespamalloc/util/callgraph.h +++ b/vespamalloc/src/vespamalloc/util/callgraph.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <stdio.h> diff --git a/vespamalloc/src/vespamalloc/util/callstack.cpp b/vespamalloc/src/vespamalloc/util/callstack.cpp index 629f6427ab3..a0645f06815 100644 --- a/vespamalloc/src/vespamalloc/util/callstack.cpp +++ b/vespamalloc/src/vespamalloc/util/callstack.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <dlfcn.h> #include <ctype.h> #include <vespamalloc/util/callstack.h> diff --git a/vespamalloc/src/vespamalloc/util/callstack.h b/vespamalloc/src/vespamalloc/util/callstack.h index 3a2986a0a89..3773d3c08b2 100644 --- a/vespamalloc/src/vespamalloc/util/callstack.h +++ b/vespamalloc/src/vespamalloc/util/callstack.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <stdio.h> diff --git a/vespamalloc/src/vespamalloc/util/index.h b/vespamalloc/src/vespamalloc/util/index.h index b690b5b4abc..fdff26fbee3 100644 --- a/vespamalloc/src/vespamalloc/util/index.h +++ b/vespamalloc/src/vespamalloc/util/index.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <cstddef> diff --git a/vespamalloc/src/vespamalloc/util/osmem.cpp b/vespamalloc/src/vespamalloc/util/osmem.cpp index f1d4a527732..8ee34782e8e 100644 --- a/vespamalloc/src/vespamalloc/util/osmem.cpp +++ b/vespamalloc/src/vespamalloc/util/osmem.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "osmem.h" #include <vespamalloc/malloc/common.h> #include <cstdio> diff --git a/vespamalloc/src/vespamalloc/util/osmem.h b/vespamalloc/src/vespamalloc/util/osmem.h index d9f45937ab8..15c6bd72f1f 100644 --- a/vespamalloc/src/vespamalloc/util/osmem.h +++ b/vespamalloc/src/vespamalloc/util/osmem.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <cstring> diff --git a/vespamalloc/src/vespamalloc/util/stream.cpp b/vespamalloc/src/vespamalloc/util/stream.cpp index 4af6ab56aba..874acf35b7e 100644 --- a/vespamalloc/src/vespamalloc/util/stream.cpp +++ b/vespamalloc/src/vespamalloc/util/stream.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "stream.h" #include <algorithm> #include <stdio.h> diff --git a/vespamalloc/src/vespamalloc/util/stream.h b/vespamalloc/src/vespamalloc/util/stream.h index 34af28486dd..d7f2d1c7df7 100644 --- a/vespamalloc/src/vespamalloc/util/stream.h +++ b/vespamalloc/src/vespamalloc/util/stream.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <cstring> diff --git a/vespamalloc/src/vespamalloc/util/traceutil.cpp b/vespamalloc/src/vespamalloc/util/traceutil.cpp index 36698125f97..55a71dc54a0 100644 --- a/vespamalloc/src/vespamalloc/util/traceutil.cpp +++ b/vespamalloc/src/vespamalloc/util/traceutil.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/util/traceutil.h> #include <algorithm> diff --git a/vespamalloc/src/vespamalloc/util/traceutil.h b/vespamalloc/src/vespamalloc/util/traceutil.h index fe424d7259e..36f1fdbebc4 100644 --- a/vespamalloc/src/vespamalloc/util/traceutil.h +++ b/vespamalloc/src/vespamalloc/util/traceutil.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <dlfcn.h> |