Mercurial > emacs
comparison src/alloc.c @ 51758:ff38ea4b40ed
(struct ablock): Only include padding when there is some.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sun, 06 Jul 2003 14:55:00 +0000 |
parents | 635066222916 |
children | ad47aa3ee2d7 |
comparison
equal
deleted
inserted
replaced
51757:e4e794926085 | 51758:ff38ea4b40ed |
---|---|
643 | 643 |
644 | 644 |
645 /* BLOCK_ALIGN has to be a power of 2. */ | 645 /* BLOCK_ALIGN has to be a power of 2. */ |
646 #define BLOCK_ALIGN (1 << 10) | 646 #define BLOCK_ALIGN (1 << 10) |
647 #define BLOCK_BYTES \ | 647 #define BLOCK_BYTES \ |
648 (BLOCK_ALIGN - sizeof (struct aligned_block *) - ABLOCKS_PADDING) | 648 (BLOCK_ALIGN - sizeof (struct alinged_block *) - ABLOCKS_PADDING) |
649 | 649 |
650 /* Internal data structures and constants. */ | 650 /* Internal data structures and constants. */ |
651 | 651 |
652 /* Padding to leave at the end of a malloc'd block. This is to give | 652 /* Padding to leave at the end of a malloc'd block. This is to give |
653 malloc a chance to minimize the amount of memory wasted to alignment. | 653 malloc a chance to minimize the amount of memory wasted to alignment. |
674 (if not, the word before the first ablock holds a pointer to the | 674 (if not, the word before the first ablock holds a pointer to the |
675 real base). */ | 675 real base). */ |
676 struct ablocks *abase; | 676 struct ablocks *abase; |
677 /* The padding of all but the last ablock is unused. The padding of | 677 /* The padding of all but the last ablock is unused. The padding of |
678 the last ablock in an ablocks is not allocated. */ | 678 the last ablock in an ablocks is not allocated. */ |
679 #if ABLOCKS_PADDING | |
679 char padding[ABLOCKS_PADDING]; | 680 char padding[ABLOCKS_PADDING]; |
681 #endif | |
680 }; | 682 }; |
681 | 683 |
682 /* A bunch of consecutive aligned blocks. */ | 684 /* A bunch of consecutive aligned blocks. */ |
683 struct ablocks | 685 struct ablocks |
684 { | 686 { |