Rev 774 | Rev 1038 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 774 | Rev 819 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 774 $ |
8 | $Revision: 819 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
Line 210... | Line 210... | ||
210 | and edi, not 4095 |
210 | and edi, not 4095 |
211 | sub ecx, edi |
211 | sub ecx, edi |
212 | jna @F |
212 | jna @F |
Line 213... | Line 213... | ||
213 | 213 | ||
214 | xor eax, eax |
- | |
215 | ; add edi, new_app_base |
214 | xor eax, eax |
216 | cld |
215 | cld |
217 | rep stosb |
216 | rep stosb |
218 | @@: |
217 | @@: |
Line 451... | Line 450... | ||
451 | test ecx, ecx |
450 | test ecx, ecx |
452 | jz .done |
451 | jz .done |
Line 453... | Line 452... | ||
453 | 452 | ||
454 | if GREEDY_KERNEL |
453 | if GREEDY_KERNEL |
455 | mov eax, 0x02 |
- | |
456 | .reserve: |
- | |
457 | stosd |
- | |
458 | invlpg [edx] |
- | |
459 | add edx, 4096 |
- | |
460 | dec ecx |
454 | mov eax, 0x02 |
461 | jnz .reserve |
455 | rep stosd |
Line 462... | Line 456... | ||
462 | else |
456 | else |
463 | 457 | ||
464 | .alloc: |
458 | .alloc: |
Line 505... | Line 499... | ||
505 | mov ecx, 1024 |
499 | mov ecx, 1024 |
506 | .free: |
500 | .free: |
507 | mov eax, [esi] |
501 | mov eax, [esi] |
508 | test eax, 1 |
502 | test eax, 1 |
509 | jz .next |
503 | jz .next |
- | 504 | test eax, 1 shl 9 |
|
- | 505 | jnz .next ;skip shared pages |
|
510 | call free_page |
506 | call free_page |
511 | .next: |
507 | .next: |
512 | add esi, 4 |
508 | add esi, 4 |
513 | dec ecx |
509 | dec ecx |
514 | jnz .free |
510 | jnz .free |
Line 574... | Line 570... | ||
574 | ret |
570 | ret |
575 | endp |
571 | endp |
Line 576... | Line 572... | ||
576 | 572 | ||
577 | align 4 |
573 | align 4 |
578 | get_pid: |
- | |
579 | ;mov eax, [TASK_DATA] ; I think it's the bug. (Rus) |
574 | get_pid: |
580 | mov eax, [TASK_BASE] |
575 | mov eax, [TASK_BASE] |
581 | mov eax, [eax+4] |
576 | mov eax, [eax+TASKDATA.pid] |
Line 582... | Line 577... | ||
582 | ret |
577 | ret |
583 | 578 | ||
584 | pid_to_slot: |
579 | pid_to_slot: |