1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

Improvement of type independency for the bitmap.

This makes 64bit operation more likely.

Reviewed by:	phk
Submitted by:	jdp
This commit is contained in:
Poul-Henning Kamp 1997-08-27 12:04:33 +00:00
parent 17c008220e
commit 263f4be35c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28835

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: malloc.c,v 1.29 1997/07/26 03:43:14 jdp Exp $
* $Id: malloc.c,v 1.30 1997/08/27 06:40:34 phk Exp $
*
*/
@ -84,6 +84,7 @@
#include <sys/mman.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -577,8 +578,8 @@ malloc_make_chunks(int bits)
return 0;
/* Find length of admin structure */
l = sizeof *bp - sizeof(u_long);
l += sizeof(u_long) *
l = offsetof(struct pginfo, bits[0]);
l += sizeof bp->bits[0] *
(((malloc_pagesize >> bits)+MALLOC_BITS-1) / MALLOC_BITS);
/* Don't waste more than two chunks on this */