Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<time.h>
- #include <vector>
- #include <list>
- using namespace std;
- #define pamiec 2048
- list<int> free_ram = { 2048 };
- //int free_ram[32];
- int temp[32];
- int przydzielona = 0, doprzydzielenia, x;
- int need_ram[6] = { 128,256,512,100,700,100 };
- struct lista
- void zwolnij()
- {
- }
- void wpisz()
- {
- while (przydzielona<6)
- {
- if (free_ram[1] > 2 * (need_ram[przydzielona]))
- {
- temp = free_ram[x];
- free_ram[x] = temp / 2;
- free_ram[x + 1] = temp / 2;
- }
- }
- }
- int main()
- {
- free_ram[0] = 2048;
- cout << free_ram[0];
- getchar();
- if (free_ram[0] + )
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement