On Mon, 01 Mar 2010, Maurilio Longo wrote:

Hi,

> I'm facing an error on OS/2 which I'm beginning to suspect it is due to the
> fact that we're not allocating the correct type of memory when calling
> DosFindFirst().

I cannot help you here. Information about DosFindFirst() in OS2 returned
by google suggest that our implementation should not work correctly, i.e.:

   Level 1 File Information (ulInfoLevel == FIL_STANDARD)
   On output, pfindbuf contains the FILEFINDBUF3 data structure _without_
   the last two fields cchName and achName. This is used without EAs.

If the above is true then you should use FIL_STANDARDL and FILEFINDBUF3L
structure.

Also seems that flAttribute parameter has wrongly value.
Without ORing with FILE_ARCHIVED and FILE_READONLY files with above
attribute should be excluded.

BTW what errors do you have?

> Now, can you tell me if _all_ memory allocations, made via hb_xgrab(), when
> using dlmalloc.c go through dlmalloc.c line 1338, that is through os2mmap()

Inside DLMALLOC _all_ memory is allocated by os2mmap() function.

> even if I'm not mmapping() nothing?

MMAP is optionally used only in *nix DLMALLOC builds to improve performance
of memory allocation. It does not exists in MS-Windows and OS2 so it cannot
be used in such builds.

> Or there are other paths to memory allocations?

Maybe but not inside DLMALLOC code, i.e. some CRTL functions may
allocate memory using different memory manager but DLMALLOC uses
only above function in OS2 builds.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to