Changeset 9a68b34d in mainline for generic/src/mm/frame.c
- Timestamp:
- 2006-05-01T19:32:59Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7dd1787
- Parents:
- 16dad032
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/frame.c
r16dad032 r9a68b34d 435 435 * 436 436 * Assume zone is locked 437 * Panics, if allocation is impossible. 437 * Panics if allocation is impossible. 438 * 439 * @param zone Zone to allocate from. 440 * @param order Allocate exactly 2^order frames. 438 441 * 439 442 * @return Frame index in zone 440 */ 441 static pfn_t zone_frame_alloc(zone_t *zone,__u8 order) 443 * 444 */ 445 static pfn_t zone_frame_alloc(zone_t *zone, __u8 order) 442 446 { 443 447 pfn_t v; … … 892 896 /** Allocate power-of-two frames of physical memory. 893 897 * 894 * @param flags Flags for host zone selection and address processing. 895 * @param order Allocate exactly 2^order frames. 896 * @param pzone Preferred zone 898 * @param order Allocate exactly 2^order frames. 899 * @param flags Flags for host zone selection and address processing. 900 * @param status Allocation status (FRAME_OK on success), unused if NULL. 901 * @param pzone Preferred zone 897 902 * 898 903 * @return Allocated frame. 899 */ 900 pfn_t frame_alloc_generic(__u8 order, int flags, int * status, int *pzone) 904 * 905 */ 906 pfn_t frame_alloc_generic(__u8 order, int flags, int *status, int *pzone) 901 907 { 902 908 ipl_t ipl; … … 907 913 loop: 908 914 ipl = interrupts_disable(); 915 909 916 /* 910 917 * First, find suitable frame zone. 911 918 */ 912 zone = find_free_zone_lock(order,pzone); 919 zone = find_free_zone_lock(order, pzone); 920 913 921 /* If no memory, reclaim some slab memory, 914 922 if it does not help, reclaim all */ … … 916 924 freed = slab_reclaim(0); 917 925 if (freed) 918 zone = find_free_zone_lock(order, pzone);926 zone = find_free_zone_lock(order, pzone); 919 927 if (!zone) { 920 928 freed = slab_reclaim(SLAB_RECLAIM_ALL); 921 929 if (freed) 922 zone = find_free_zone_lock(order, pzone);930 zone = find_free_zone_lock(order, pzone); 923 931 } 924 932 } … … 942 950 goto loop; 943 951 } 944 v = zone_frame_alloc(zone,order); 952 953 v = zone_frame_alloc(zone, order); 945 954 v += zone->base; 946 955
Note:
See TracChangeset
for help on using the changeset viewer.