Greatly enlarged the number of possible kernel_arg ranges as we were already
pretty close, and the number of loaded modules have a direct influence on this (even though we're currently loading the symbols by default). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19320 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2005, Axel Dörfler, [email protected].
|
* Copyright 2002-2006, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define CURRENT_KERNEL_ARGS_VERSION 1
|
#define CURRENT_KERNEL_ARGS_VERSION 1
|
||||||
#define MAX_KERNEL_ARGS_RANGE 8
|
#define MAX_KERNEL_ARGS_RANGE 16
|
||||||
|
|
||||||
typedef struct kernel_args {
|
typedef struct kernel_args {
|
||||||
uint32 kernel_args_size;
|
uint32 kernel_args_size;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
static const size_t kChunkSize = 16384;
|
static const size_t kChunkSize = 4 * B_PAGE_SIZE;
|
||||||
|
|
||||||
kernel_args gKernelArgs;
|
kernel_args gKernelArgs;
|
||||||
|
|
||||||
@@ -140,6 +140,8 @@ add_kernel_args_range(void *start, uint32 size)
|
|||||||
extern "C" void *
|
extern "C" void *
|
||||||
kernel_args_malloc(size_t size)
|
kernel_args_malloc(size_t size)
|
||||||
{
|
{
|
||||||
|
//dprintf("kernel_args_malloc(): %ld bytes (%ld bytes left)\n", size, sFree);
|
||||||
|
|
||||||
if (sFirstFree != NULL && size <= sFree) {
|
if (sFirstFree != NULL && size <= sFree) {
|
||||||
// there is enough space in the current buffer
|
// there is enough space in the current buffer
|
||||||
void *address = sFirstFree;
|
void *address = sFirstFree;
|
||||||
|
|||||||
Reference in New Issue
Block a user