ef58758286
Instead of allocating stack from the main heap, this patch mmaps stack memory together with guard page. This aproach reduces main heap usage, and stack memory is prefaulted on demand, so bigger process stacks will have zero impact on memory usage as long as stack memory is not needed for real. In addition, it fixes issue with systems which have bigger default page size (observed with 65536). Type: improvement Change-Id: I593365c603d4702e428967d80fd425fdee2c4a21 Signed-off-by: Damjan Marion <damarion@cisco.com>
24 lines
865 B
C
24 lines
865 B
C
/*
|
|
* Copyright (c) 2018 Cisco and/or its affiliates.
|
|
* Licensed 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.
|
|
*/
|
|
|
|
#ifndef included_vlib_config_h
|
|
#define included_vlib_config_h
|
|
|
|
#define __PRE_DATA_SIZE @PRE_DATA_SIZE@
|
|
#define VLIB_BUFFER_ALLOC_FAULT_INJECTOR @BUFFER_ALLOC_FAULT_INJECTOR@
|
|
#define VLIB_PROCESS_LOG2_STACK_SIZE @VLIB_PROCESS_LOG2_STACK_SIZE@
|
|
|
|
#endif
|