11 APTR
PM_AllocVecPooled(size_t size
)
17 ObtainSemaphore(&MemPoolSemaphore
);
18 ptr
= AllocPooled(MemPool
, size
+ sizeof(size_t));
19 ReleaseSemaphore(&MemPoolSemaphore
);
22 size_t *sptr
= (size_t *) ptr
;
26 d1(kprintf(__FILE__
"/%s/%ld: MemPool=%08lx Size=%lu mem=%08lx\n",
27 __FUNC__
, __LINE__
, MemPool
, size
, &sptr
[1]));
28 return (APTR
)(&sptr
[1]);
32 d1(kprintf(__FILE__
"/%s/%ld: MemPool=%08lx Size=%lu\n", __FUNC__
, __LINE__
, MemPool
, size
));
37 void PM_FreeVecPooled(APTR mem
)
39 d1(kprintf(__FUNC__
"/%ld: MemPool=%08lx mem=%08lx\n", __LINE__
, MemPool
, mem
));
43 size_t *sptr
= (size_t *) mem
;
48 d1(kprintf(__FILE__
"/%s/%ld: MemPool=%08lx size=%lu mem=%08lx\n",
49 __FUNC__
, __LINE__
, MemPool
, size
, &sptr
[1]));
51 ObtainSemaphore(&MemPoolSemaphore
);
52 FreePooled(MemPool
, mem
, size
+ sizeof(size_t));
53 ReleaseSemaphore(&MemPoolSemaphore
);
57 ULONG
PM_String_Length(STRPTR s
)
66 STRPTR
PM_String_Copy(STRPTR Source
, STRPTR Dest
, LONG Len
)
81 Dest
[ctr
]=Source
[ctr
];
88 ULONG
PM_String_Compare(STRPTR str1
, STRPTR str2
)
98 if (!str1
[i
] || !str2
[i
] || j
)
103 void PM_StrCat(STRPTR str1
, STRPTR str2
)