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