View a printable version of the current page.
  Wiki > Symbian Developer Network Public Wiki > ... > P.I.P.S. Booklet > P.I.P.S. Booklet errata
  P.I.P.S. Booklet errata
Added by jostichbury, last edited by jostichbury on Sep 29, 2008  (view change)
Labels: 
(None)

Page 16

"WSD is a widely used programming construct on other platforms. Symbian OS fully supports WSD in EXE, but there are issues with the use of WSD in DLLs and the practice is generally discouraged."

That said, porting is exactly the use case where we "encourage" it, particularly in those cases where the DLL is not widely shared. See http://developer.symbian.com/main/support/code_clinic/clinic_april2008/index.jsp for further discussion.

"On target hardware (or phones), DLL WSD works correctly if you explicitly use the EPOCALLOWDLLDATA directive in your DLL's MMP file. However, you are limited to 4KB of WSD per DLL. Also, a process that attaches to the DLL incurs a cost of 4KB (one chunk), even if the actual size of WSD variables in the DLL is smaller. If the DLL is linked to by several processes, this cost can be significant."

1. "However, you are limited to 4KB of WSD per DLL".

In fact, the WSD chunk will grow if more than 4KB is required.

2. "Also, a process that attaches to the DLL incurs a cost of 4KB (one chunk)".

It is one PTE (page table entry - ie minimum RAM you can allocate via page table/MMU) that is consumed, not one chunk.

3. The above does not cover the fact that this a one-off. If a process attaches to another DLL that also uses WSD, the variables go in the same WSD data area (ie its not 2 times 4Kb)

Page 23

In the MMP file on left - the following should be uncommented:
// LIBRARY libc.lib

// STATICLIBRARY libcrt0.lib 

[live-web] Interactive Services Terms & Conditions of use | Terms of use | Privacy policy | Media Center | Contact us | © 2008 Symbian