Subversion Repositories Kolibri OS

Rev

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

Rev 6891 Rev 6893
Line 2546... Line 2546...
2546
  * eсx = slot number
2546
  * eсx = slot number
2547
Returned value:
2547
Returned value:
2548
  * eax = if successful - pointer to a memory with data
2548
  * eax = if successful - pointer to a memory with data
2549
  * eax = 1 - error
2549
  * eax = 1 - error
2550
  * eax = -1 - main list area not found
2550
  * eax = -1 - main list area not found
2551
Remarks:
-
 
2552
  * The function must be used in conjunction with 68.11. The
-
 
2553
    application must pre-initialize the local heap by calling 68.11.
-
 
Line 2554... Line 2551...
2554
 
2551
 
2555
---------------------- Constants for registers: ----------------------
2552
---------------------- Constants for registers: ----------------------
2556
  eax - SF_CLIPBOARD (54)
2553
  eax - SF_CLIPBOARD (54)
2557
  ebx - SSF_READ_CB (1)
2554
  ebx - SSF_READ_CB (1)
Line 2956... Line 2953...
2956
Returned value:
2953
Returned value:
2957
  * eax = 0 - success
2954
  * eax = 0 - success
2958
  * eax = 1 - not enough memory
2955
  * eax = 1 - not enough memory
2959
Remarks:
2956
Remarks:
2960
  * There is another way to dynamically allocate/free memory -
2957
  * There is another way to dynamically allocate/free memory -
2961
    subfunctions 11, 12, 13 of function 68.
2958
    subfunctions 12, 13 and 20 of function 68, but after creation
2962
  * The function cannot be used together with 68.11, 68.12, 68.13.
-
 
2963
    The function call will be ignored after creation of process heap
2959
    of the process heap 64 function call will be ignored.
2964
    with function 68.11.
-
 
Line 2965... Line 2960...
2965
 
2960
 
2966
---------------------- Constants for registers: ----------------------
2961
---------------------- Constants for registers: ----------------------
2967
  eax - SF_MEMORY_RESIZE (64)
2962
  eax - SF_MEMORY_RESIZE (64)
2968
======================================================================
2963
======================================================================
Line 3261... Line 3256...
3261
 
3256
 
3262
---------------------- Constants for registers: ----------------------
3257
---------------------- Constants for registers: ----------------------
3263
  eax - SF_SYS_MISC (68)
3258
  eax - SF_SYS_MISC (68)
3264
  ebx - SSF_WRITE_MSR (4)
3259
  ebx - SSF_WRITE_MSR (4)
3265
======================================================================
3260
======================================================================
3266
======= Function 68, subfunction 11 - initialize process heap. =======
3261
=== Function 68, subfunction 11 - manually initialize process heap ===
3267
======================================================================
3262
======================================================================
3268
Parameters:
3263
Parameters:
3269
  * eax = 68 - function number
3264
  * eax = 68 - function number
3270
  * ebx = 11 - subfunction number
3265
  * ebx = 11 - subfunction number
3271
Returned value:
3266
Returned value:
3272
  * eax = 0 - failed
3267
  * eax = 0 - failed
3273
  * otherwise size of created heap
3268
  * otherwise size of created heap
3274
Remarks:
3269
Remarks:
3275
  * The function call initializes heap, from which one can in future
3270
  * The function call initializes heap for subfunctions 12, 13 and 20.
-
 
3271
  * If the process heap is already created, this function will return
3276
    allocate and free memory blocks with subfunctions 12 and 13.
3272
    the size of the existing heap.
3277
    Heap size is equal to total amount of free application memory.
-
 
3278
  * The second function call from the same process results in
-
 
3279
    returning the size of the existing heap.
3273
    Heap size is equal to total amount of free application memory.
Line 3280... Line 3274...
3280
  * After creation of the heap calls to function 64 will be ignored.
3274
  * After creation of the heap calls to function 64 will be ignored.
3281
 
3275
 
3282
---------------------- Constants for registers: ----------------------
3276
---------------------- Constants for registers: ----------------------
Line 3290... Line 3284...
3290
  * ebx = 12 - subfunction number
3284
  * ebx = 12 - subfunction number
3291
  * ecx = required size in bytes
3285
  * ecx = required size in bytes
3292
Returned value:
3286
Returned value:
3293
  * eax = pointer to the allocated block
3287
  * eax = pointer to the allocated block
3294
Remarks:
3288
Remarks:
3295
  * Before this call one must initialize process heap by call to
-
 
3296
    subfunction 11.
-
 
3297
  * The function allocates an integer number of pages (4 Kb) in such
3289
  * The function allocates an integer number of pages (4 Kb) in such
3298
    way that the real size of allocated block is more than or equal to
3290
    way that the real size of allocated block is more than or equal to
3299
    requested size.
3291
    requested size.
Line 3300... Line 3292...
3300
 
3292
 
Line 3419... Line 3411...
3419
  * ecx = new size in bytes
3411
  * ecx = new size in bytes
3420
  * edx = pointer to already allocated block
3412
  * edx = pointer to already allocated block
3421
Returned value:
3413
Returned value:
3422
  * eax = pointer to the reallocated block, 0 = error
3414
  * eax = pointer to the reallocated block, 0 = error
3423
Remarks:
3415
Remarks:
3424
  * Before this call one must initialize process heap by call to
-
 
3425
    subfunction 11.
-
 
3426
  * The function allocates an integer number of pages (4 Kb) in such
3416
  * The function allocates an integer number of pages (4 Kb) in such
3427
    way that the real size of allocated block is more than or equal to
3417
    way that the real size of allocated block is more than or equal to
3428
    requested size.
3418
    requested size.
3429
  * If edx=0, the function call is equivalent to memory allocation
3419
  * If edx=0, the function call is equivalent to memory allocation
3430
    with subfunction 12. Otherwise the block at edx
3420
    with subfunction 12. Otherwise the block at edx
Line 3483... Line 3473...
3483
  * E_NOTFOUND = 5
3473
  * E_NOTFOUND = 5
3484
  * E_ACCESS = 10
3474
  * E_ACCESS = 10
3485
  * E_NOMEM = 30
3475
  * E_NOMEM = 30
3486
  * E_PARAM = 33
3476
  * E_PARAM = 33
3487
Remarks:
3477
Remarks:
3488
  * Before this call one must initialize process heap by call to
-
 
3489
    subfunction 11.
-
 
3490
  * If a new area is created, access flags set maximal rights
3478
  * If a new area is created, access flags set maximal rights
3491
    for other processes. An attempt from other process to open
3479
    for other processes. An attempt from other process to open
3492
    with denied rights will fail with error code E_ACCESS.
3480
    with denied rights will fail with error code E_ACCESS.
3493
  * The process which has created an area always has write access.
3481
  * The process which has created an area always has write access.