Rev 444 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 444 | Rev 453 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | $Revision: 431 $ |
1 | $Revision: 448 $ |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;; ;; |
3 | ;; ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
Line 109... | Line 109... | ||
109 | proc free_page |
109 | proc free_page |
110 | ;arg: eax page address |
110 | ;arg: eax page address |
111 | pushfd |
111 | pushfd |
112 | cli |
112 | cli |
113 | shr eax, 12 ;page index |
113 | shr eax, 12 ;page index |
114 | mov ebx, sys_pgmap |
- | |
115 | bts [ebx], eax ;that's all! |
114 | bts dword [sys_pgmap], eax ;that's all! |
116 | cmc |
115 | cmc |
117 | adc [pg_data.pages_free], 0 |
116 | adc [pg_data.pages_free], 0 |
118 | shr eax, 3 |
117 | shr eax, 3 |
119 | and eax, not 3 ;dword offset from page_map |
118 | and eax, not 3 ;dword offset from page_map |
120 | add eax, ebx |
119 | add eax, sys_pgmap |
121 | cmp [page_start], eax |
120 | cmp [page_start], eax |
122 | ja @f |
121 | ja @f |
123 | popfd |
122 | popfd |
124 | ret |
123 | ret |
125 | @@: |
124 | @@: |
Line 960... | Line 959... | ||
960 | mov [ecx+APPDATA.sse_handler], ebx |
959 | mov [ecx+APPDATA.sse_handler], ebx |
961 | mov [esp+36], eax |
960 | mov [esp+36], eax |
962 | ret |
961 | ret |
963 | @@: |
962 | @@: |
964 | cmp eax, 19 |
963 | cmp eax, 19 |
965 | ja .fail |
964 | ja @f |
966 | ; add ebx, new_app_base |
- | |
967 | cmp ebx, OS_BASE |
965 | cmp ebx, OS_BASE |
968 | jae .fail |
966 | jae .fail |
969 | stdcall load_library, ebx |
967 | stdcall load_library, ebx |
970 | mov [esp+36], eax |
968 | mov [esp+36], eax |
971 | ret |
969 | ret |
Line -... | Line 970... | ||
- | 970 | ||
- | 971 | @@: |
|
- | 972 | cmp eax, 20 |
|
- | 973 | ja .fail |
|
- | 974 | mov eax, ecx |
|
- | 975 | call user_realloc |
|
- | 976 | mov [esp+36], eax |
|
- | 977 | ret |
|
972 | 978 | ||
973 | .fail: |
979 | .fail: |
974 | xor eax, eax |
980 | xor eax, eax |
975 | mov [esp+36], eax |
981 | mov [esp+36], eax |