From: Vladimir Davydov <vdavydov.dev@gmail.com> To: Cyrill Gorcunov <gorcunov@gmail.com> Cc: tml <tarantool-patches@freelists.org> Subject: Re: [PATCH 1/3] build: Check for madvise syscall Date: Mon, 6 May 2019 13:25:14 +0300 [thread overview] Message-ID: <20190506102514.4vi5kbokus4gfkgq@esperanza> (raw) In-Reply-To: <20190501155006.14546-2-gorcunov@gmail.com> On Wed, May 01, 2019 at 06:50:04PM +0300, Cyrill Gorcunov wrote: > Need to check if madvise is present in the system I don't think there's much point in splitting this change in three patches. Please squash. OTOH it'd be nice to see how this API is intended to be used within Tarantool. Could you please submit the patch utilizing this feature in the same series? > > Part of #3509 There's no issue 3509 in tarantool/small repository. Please paste the full link instead - GitHub web interface knows how to show them. > --- > https://github.com/tarantool/tarantool/issues/3509 > > CMakeLists.txt | 11 +++++++++++ > small/config.h.cmake | 9 +++++++++ > 2 files changed, 20 insertions(+) > create mode 100644 small/config.h.cmake > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index ad27423..97d25bc 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -1,6 +1,8 @@ > project(small C CXX) > cmake_minimum_required(VERSION 2.8 FATAL_ERROR) > > +include(CheckFunctionExists) > + > if(NOT CMAKE_BUILD_TYPE) > set(CMAKE_BUILD_TYPE Debug) > endif() > @@ -15,10 +17,19 @@ endif() > # Enable GNU glibc extentions. > add_definitions("-D_GNU_SOURCE") > > +check_function_exists(madvise TARANTOOL_SMALL_HAS_MADVISE) I think we'd better check that MADV_DONTDUMP is available with the aid of check_symbol_exists. > + > +configure_file( > + "small/config.h.cmake" > + "small/config.h" > + ) > +message (STATUS "") > + > # Valgrind > include_directories(third_party) > > set(lib_headers > + small/config.h > small/ibuf.h > small/lf_lifo.h > small/lifo.h > diff --git a/small/config.h.cmake b/small/config.h.cmake > new file mode 100644 > index 0000000..1c9db10 > --- /dev/null > +++ b/small/config.h.cmake > @@ -0,0 +1,9 @@ > +#ifndef TARANTOOL_SMALL_CONFIG_H_INCLUDED > +#define TARANTOOL_SMALL_CONFIG_H_INCLUDED > + > +/* > + * Defined if this platform has madvise(..). > + */ > + #cmakedefine TARANTOOL_SMALL_HAS_MADVISE 1 > + > +#endif /* TARANTOOL_SMALL_CONFIG_H_INCLUDED */
next prev parent reply other threads:[~2019-05-06 10:25 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-01 15:50 [PATCH 0/3] small: Prepare ground for madvise Cyrill Gorcunov 2019-05-01 15:50 ` [PATCH 1/3] build: Check for madvise syscall Cyrill Gorcunov 2019-05-06 10:25 ` Vladimir Davydov [this message] 2019-05-06 10:39 ` Cyrill Gorcunov 2019-05-01 15:50 ` [PATCH 2/3] slab_arena: Provide slab_arena_madvise_create to madvice slabs Cyrill Gorcunov 2019-05-06 10:38 ` Vladimir Davydov 2019-05-06 11:03 ` Cyrill Gorcunov 2019-05-06 13:46 ` Alexander Turenko 2019-05-01 15:50 ` [PATCH 3/3] test: slab_arena -- Verify madvise Cyrill Gorcunov 2019-05-06 10:45 ` Vladimir Davydov 2019-05-06 10:48 ` Cyrill Gorcunov 2019-05-06 10:55 ` Vladimir Davydov 2019-05-06 10:57 ` Cyrill Gorcunov 2019-05-06 11:04 ` Alexander Turenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190506102514.4vi5kbokus4gfkgq@esperanza \ --to=vdavydov.dev@gmail.com \ --cc=gorcunov@gmail.com \ --cc=tarantool-patches@freelists.org \ --subject='Re: [PATCH 1/3] build: Check for madvise syscall' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox