Advertisement
Guest User

Untitled

a guest
May 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include<iostream>
  2. #include<time.h>
  3. #include <vector>
  4. #include <list>
  5.  
  6. using namespace std;
  7. #define pamiec 2048
  8.  
  9. list<int> free_ram = { 2048 };
  10. //int free_ram[32];
  11. int temp[32];
  12. int przydzielona = 0, doprzydzielenia, x;
  13.  
  14.  
  15. int need_ram[6] = { 128,256,512,100,700,100 };
  16.  
  17.  
  18. struct lista
  19.  
  20. void zwolnij()
  21. {
  22.  
  23.  
  24.  
  25.  
  26. }
  27.  
  28.  
  29. void wpisz()
  30.  
  31. {
  32. while (przydzielona<6)
  33. {
  34.  
  35. if (free_ram[1] > 2 * (need_ram[przydzielona]))
  36. {
  37. temp = free_ram[x];
  38. free_ram[x] = temp / 2;
  39. free_ram[x + 1] = temp / 2;
  40.  
  41.  
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. }
  51.  
  52.  
  53. }
  54.  
  55.  
  56.  
  57. int main()
  58. {
  59. free_ram[0] = 2048;
  60. cout << free_ram[0];
  61. getchar();
  62.  
  63. if (free_ram[0] + )
  64.  
  65.  
  66.  
  67. return 0;
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement