Mercurial > hg > xemacs-beta
comparison src/malloc.c @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 3ecd8885ac67 |
children | b39c14581166 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
199 #endif /* __STDC__ */ | 199 #endif /* __STDC__ */ |
200 | 200 |
201 extern char *start_of_data (void); | 201 extern char *start_of_data (void); |
202 | 202 |
203 #ifdef BSD | 203 #ifdef BSD |
204 #ifndef DATA_SEG_BITS | |
205 #define start_of_data() &etext | 204 #define start_of_data() &etext |
206 #endif | |
207 #endif | 205 #endif |
208 | 206 |
209 #ifndef emacs | 207 #ifndef emacs |
210 #define start_of_data() &etext | 208 #define start_of_data() &etext |
211 #endif | 209 #endif |
738 v.nfree++; | 736 v.nfree++; |
739 | 737 |
740 return v; | 738 return v; |
741 } | 739 } |
742 int | 740 int |
743 malloc_mem_used () | 741 malloc_mem_used (void) |
744 { | 742 { |
745 int i; | 743 int i; |
746 int size_used; | 744 int size_used; |
747 | 745 |
748 size_used = 0; | 746 size_used = 0; |
757 | 755 |
758 return size_used; | 756 return size_used; |
759 } | 757 } |
760 | 758 |
761 int | 759 int |
762 malloc_mem_free () | 760 malloc_mem_free (void) |
763 { | 761 { |
764 int i; | 762 int i; |
765 int size_unused; | 763 int size_unused; |
766 | 764 |
767 size_unused = 0; | 765 size_unused = 0; |
787 */ | 785 */ |
788 | 786 |
789 #ifdef USG | 787 #ifdef USG |
790 | 788 |
791 static void | 789 static void |
792 get_lim_data () | 790 get_lim_data (void) |
793 { | 791 { |
794 #ifdef ULIMIT_BREAK_VALUE | 792 #ifdef ULIMIT_BREAK_VALUE |
795 lim_data = ULIMIT_BREAK_VALUE; | 793 lim_data = ULIMIT_BREAK_VALUE; |
796 #else | 794 #else |
797 lim_data = ulimit (3, 0); | 795 lim_data = ulimit (3, 0); |
802 | 800 |
803 #else /* not USG */ | 801 #else /* not USG */ |
804 #ifndef BSD4_2 | 802 #ifndef BSD4_2 |
805 | 803 |
806 static void | 804 static void |
807 get_lim_data () | 805 get_lim_data (void) |
808 { | 806 { |
809 lim_data = vlimit (LIM_DATA, -1); | 807 lim_data = vlimit (LIM_DATA, -1); |
810 } | 808 } |
811 | 809 |
812 #else /* BSD4_2 */ | 810 #else /* BSD4_2 */ |
813 | 811 |
814 static void | 812 static void |
815 get_lim_data () | 813 get_lim_data (void) |
816 { | 814 { |
817 struct rlimit XXrlimit; | 815 struct rlimit XXrlimit; |
818 | 816 |
819 getrlimit (RLIMIT_DATA, &XXrlimit); | 817 getrlimit (RLIMIT_DATA, &XXrlimit); |
820 #ifdef RLIM_INFINITY | 818 #ifdef RLIM_INFINITY |