Subversion Repositories Kolibri OS

Rev

Rev 278 | Rev 281 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 278 Rev 279
Line 262... Line 262...
262
           popfd
262
           popfd
263
           ret
263
           ret
264
endp
264
endp
265
 
265
 
Line -... Line 266...
-
 
266
; param
-
 
267
;  ecx= size
-
 
268
;  eax= base
-
 
269
 
-
 
270
align 4
-
 
271
release_pages:
-
 
272
 
-
 
273
           mov ebx, pg_data.pg_mutex
-
 
274
           call wait_mutex      ;ebx
-
 
275
 
-
 
276
           shr ecx, 12
-
 
277
           mov esi, eax
-
 
278
           mov edi, eax
-
 
279
 
-
 
280
           shr esi, 10
-
 
281
           add esi, pages_tab
-
 
282
 
-
 
283
           mov ebx, [page_start]
-
 
284
           mov edx, sys_pgmap
-
 
285
@@:
-
 
286
           xor eax, eax
-
 
287
           xchg eax, [esi]
-
 
288
           invlpg [edi]
-
 
289
 
-
 
290
           test eax, 1
-
 
291
           jz .next
-
 
292
 
-
 
293
           shr eax, 12
-
 
294
           bts [edx], eax
-
 
295
           inc [pg_data.pages_free]
-
 
296
           shr eax, 3
-
 
297
           and eax, -4
-
 
298
           add eax, edx
-
 
299
           cmp eax, ebx
-
 
300
           jae .next
-
 
301
 
-
 
302
           mov ebx, eax
-
 
303
.next:
-
 
304
           add edi, 0x1000
-
 
305
           add esi, 4
-
 
306
           dec ecx
-
 
307
           jnz @B
-
 
308
 
-
 
309
           and [pg_data.pg_mutex],0
-
 
310
           ret
-
 
311
 
266
align 4
312
align 4
267
proc map_page_table stdcall, lin_addr:dword, phis_addr:dword
313
proc map_page_table stdcall, lin_addr:dword, phis_addr:dword
268
           mov ebx, [lin_addr]
314
           mov ebx, [lin_addr]
269
           shr ebx, 22
315
           shr ebx, 22
270
           mov eax, [phis_addr]
316
           mov eax, [phis_addr]
Line 1315... Line 1361...
1315
   mem_used_list   rd 1
1361
   mem_used_list   rd 1
1316
   mem_block_arr   rd 1
1362
   mem_block_arr   rd 1
1317
   mem_block_start rd 1
1363
   mem_block_start rd 1
1318
   mem_block_end   rd 1
1364
   mem_block_end   rd 1
-
 
1365
 
-
 
1366
   heap_mutex      rd 1
1319
   heap_size       rd 1
1367
   heap_size       rd 1
1320
   heap_free       rd 1
1368
   heap_free       rd 1
1321
   heap_blocks     rd 1
1369
   heap_blocks     rd 1
1322
   free_blocks     rd 1
1370
   free_blocks     rd 1