Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 846 | Rev 847 | ||
---|---|---|---|
Line 554... | Line 554... | ||
554 | pop ebx |
554 | pop ebx |
555 | pop esi |
555 | pop esi |
556 | ret |
556 | ret |
Line 557... | Line 557... | ||
557 | 557 | ||
558 | _init_mm: |
- | |
559 | push esi |
- | |
560 | xor eax, eax |
558 | _init_mm: |
561 | push ebx |
- | |
562 | xor esi, esi |
559 | push ebx |
563 | sub esp, 20 |
560 | sub esp, 24 |
564 | mov ebx, DWORD PTR [_mem_counter] |
- | |
565 | test ebx, ebx |
- | |
566 | jle .L93 |
- | |
567 | xor ecx, ecx |
- | |
568 | xor edx, edx |
- | |
569 | jmp .L94 |
- | |
570 | .L95: |
- | |
571 | add ecx, 1 |
- | |
572 | add edx, 20 |
- | |
573 | cmp ecx, ebx |
- | |
574 | je .L103 |
- | |
575 | .L94: |
- | |
576 | cmp DWORD PTR [_mem_table+edx+16], 1 |
- | |
577 | jne .L95 |
561 | mov eax, DWORD PTR [_mem_amount] |
578 | mov eax, DWORD PTR [_mem_table+edx] |
- | |
579 | add eax, DWORD PTR [_mem_table+edx+8] |
- | |
580 | and eax, -4096 |
- | |
581 | cmp esi, eax |
- | |
582 | jae .L95 |
- | |
583 | add ecx, 1 |
- | |
584 | add edx, 20 |
- | |
585 | cmp ecx, ebx |
- | |
586 | mov esi, eax |
- | |
587 | jne .L94 |
- | |
588 | .L103: |
- | |
589 | cmp esi, 268435456 |
- | |
590 | mov eax, esi |
- | |
591 | ja .L104 |
562 | mov DWORD PTR [esp], .LC3 |
592 | mov esi, eax |
563 | mov ebx, eax |
593 | shr esi, 12 |
- | |
594 | .L93: |
- | |
595 | mov DWORD PTR [_mem_amount], eax |
- | |
596 | mov [pg_data.mem_amount], eax |
- | |
597 | mov [pg_data.pages_count], esi |
- | |
598 | 564 | shr ebx, 12 |
|
599 | mov DWORD PTR [esp+8], esi |
565 | mov DWORD PTR [esp+8], ebx |
600 | mov DWORD PTR [esp+4], eax |
- | |
601 | mov DWORD PTR [esp], .LC1 |
566 | mov DWORD PTR [esp+4], eax |
- | 567 | call _printf |
|
- | 568 | mov eax, DWORD PTR [_pg_balloc] |
|
- | 569 | mov DWORD PTR [esp], .LC4 |
|
- | 570 | mov DWORD PTR [esp+8], eax |
|
602 | call _printf |
571 | lea eax, [ebx+ebx*4] |
- | 572 | sal eax, 2 |
|
- | 573 | mov DWORD PTR [esp+4], eax |
|
603 | 574 | call _printf |
|
604 | mov DWORD PTR [esp+8], esi |
575 | mov DWORD PTR [esp+8], ebx |
605 | mov DWORD PTR [esp+4], 0 |
576 | mov DWORD PTR [esp+4], 0 |
606 | mov DWORD PTR [esp], _z_core |
- | |
607 | 577 | mov DWORD PTR [esp], _z_core |
|
608 | call _zone_create |
578 | call _zone_create |
609 | mov DWORD PTR [esp+8], esi |
579 | mov DWORD PTR [esp+8], ebx |
610 | mov DWORD PTR [esp+4], 0 |
580 | mov DWORD PTR [esp+4], 0 |
611 | mov DWORD PTR [esp], _z_core |
581 | mov DWORD PTR [esp], _z_core |
612 | call _zone_release |
582 | call _zone_release |
613 | mov eax, DWORD PTR [_pg_balloc] |
583 | mov eax, DWORD PTR [_pg_balloc] |
614 | mov DWORD PTR [esp+4], 0 |
584 | mov DWORD PTR [esp+4], 0 |
615 | mov DWORD PTR [esp], _z_core |
585 | mov DWORD PTR [esp], _z_core |
616 | shr eax, 12 |
586 | shr eax, 12 |
617 | mov DWORD PTR [esp+8], eax |
587 | mov DWORD PTR [esp+8], eax |
618 | call _zone_reserve |
588 | call _zone_reserve |
619 | add esp, 20 |
589 | add esp, 24 |
620 | pop ebx |
- | |
621 | pop esi |
590 | pop ebx |
622 | ret |
591 | ret |
623 | .L104: |
- | |
624 | mov eax, 268435456 |
- | |
625 | mov esi, eax |
- | |
626 | shr esi, 12 |
592 | .LC3: |
627 | jmp .L93 |
593 | db "last page = %x total pages = %x",10,0 |
628 | .LC1: |
594 | .LC4: |
- | 595 | db "conf_size = %x free mem start =%x",10,0 |
|
Line 629... | Line 596... | ||
629 | db 'memory size = %x total pages = %x',10,0 |
596 | |
630 | 597 | ||
631 | _frame_free: |
598 | _frame_free: |