<PAGE>   1

                                                                   EXHIBIT 10.42

                      SECOND AMENDMENT TO CREDIT AGREEMENT


        THIS SECOND AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is entered
into as of April 28, 1999, by and among SMART MODULAR TECHNOLOGIES, INC., a
California Corporation ("Borrower"), SMART MODULAR TECHNOLOGIES (EUROPE)
LIMITED, a private limited company incorporated in England, ("Smart(Europe)"),
and WELLS FARGO BANK, NATIONAL ASSOCIATION ("Bank").

                                    RECITALS

        WHEREAS, Borrower is currently indebted to Bank pursuant to the terms
and conditions of that certain Credit Agreement between Borrower and Bank dated
as of May 1, 1998, as amended from time to time ("Credit Agreement").

        WHEREAS, Bank and Borrower have agreed to certain changes in the terms
and conditions set forth in the Credit Agreement and have agreed to amend the
Credit Agreement to reflect said changes.

        NOW, THEREFORE, for valuable consideration, the receipt and sufficiency
of which are hereby acknowledged, the parties hereto agree that the Credit
Agreement shall be amended as follows:

        1.      Section 1.1(a) is hereby amended (a) by deleting "May 1, 1999"
as the last day on which Bank will make advances under the Line of Credit, and
by substituting for said date "May 1, 2000," and (b) by deleting "Twenty Million
Dollars ($20,000,000.00)" as the maximum principal amount available under the
Line of Credit, and by substituting for said amount "Thirty Million Dollars
($30,000,000.00)," with such changes to be effective upon the execution and
delivery to Bank of a promissory note substantially in the form of Exhibit A
attached hereto (which promissory note shall replace and be deemed the Line of
Credit Note defined in and made pursuant to the Credit Agreement) and all other
contracts, instruments and documents required by Bank to evidence such change.

        2.      Section 1.1(b) is hereby amended by deleting "May 1, 1999" as
the last day on which Bank will make advances under the Subfeature, and by
substituting for said date "May 1, 2000", with such change to be effective upon
the execution and delivery to Bank of a promissory note substantially in the
form of Exhibit B attached hereto (which promissory note shall replace and be
deemed the Smart (Europe) Note defined in and made pursuant to the Credit
Agreement) and all other contracts, instruments and documents required by Bank
to evidence such change.



<PAGE>   2

        3.      Section 1.2(c) is hereby deleted in its entirety, and the
following substituted therefor:

                "(c) Unused Commitment Fee. Borrower shall pay to Bank a fee
        equal to fifteen hundredths percent (0.15%) per annum (computed on the
        basis of a 360-day year, actual days elapsed) on the average daily
        unused amount of the Line of Credit, which fee shall be calculated on a
        quarterly basis by Bank and shall be due and payable by Borrower in
        arrears each June 30, September 30, December 31, and March 31."

        4.      Section 4.3(d) is hereby deleted in its entirety, and the
following substituted therefor:

                "(d) contemporaneously with each annual and quarterly financial
        statement of Borrower required hereby, a compliance certificate of the
        Chief Executive Officer or Chief Financial Officer or Controller of
        Borrower that said financial statements are accurate and that there
        exists no Event of Default nor any condition, act or event which with
        the giving of notice or the passage of time or both would constitute an
        Event of Default; and"

        5.      Section 4.9(a) and (c) are hereby deleted in their entirety,
and the following substituted therefor:

                "(a) Tangible Net Worth not less than $279,000,000.00 as of
        October 31, 1998, plus, thereafter, on a cumulative basis, an amount
        equal to 80% of net income after taxes (with no deduction for losses)
        and 100% of proceeds of new equity (less reasonable and customary costs
        of issuance) since October 31, 1998, less the effect of any stock
        repurchase up to $50,000,000.00, determined as of each fiscal quarter
        end, with "Tangible Net Worth" defined as the aggregate of total
        stockholders' equity plus subordinated debt less any intangible assets.

                (c) Quick Ratio not at any time less than 1.25 to 1.0 determined
        as of each fiscal quarter end, with "Quick Ratio" defined as the
        aggregate of unrestricted cash and cash equivalents, unrestricted
        marketable



                                      -2-
<PAGE>   3

        securities and receivables convertible into cash divided by total
        current liabilities."

Sections 4.9(b) and (d) remain unchanged.

        6.      Section 5.2 is hereby deleted in its entirety, and the following
substituted therefor:

                "SECTION 5.2. OTHER INDEBTEDNESS. Create, incur, assume or
        permit to exist any indebtedness or liabilities resulting from
        borrowings, loans, leases or advances, whether secured or unsecured,
        matured or unmatured, liquidated or unliquidated, joint or several,
        except (a) the liabilities of Borrower and Smart(Europe) to Bank, (b)
        any other liabilities of Borrower or Smart(Europe) existing as of, and
        disclosed to Bank prior to, the date hereof, (c) to the extent not
        included in clause (b), indebtedness incurred in the ordinary course of
        business for the purpose of purchasing inventory, equipment and/or real
        estate not to exceed $8,000,000.00 outstanding at any time, and (d)
        subordinated indebtedness pursuant to subordination agreements in form
        and content acceptable to Bank; (e) extensions, modifications,
        refinancings and refundings of the foregoing, so long as the maximum
        principal amount is not increased; and (f) liabilities arising under
        operating leases (inclusive of operating leases included under clause
        (b) hereof) requiring payment of more than $20,000,000.00 in the
        aggregate during any fiscal year."

        7.      Section 5.3 is hereby deleted in its entirety, and the following
substituted therefor:

                "SECTION 5.3. MERGER, CONSOLIDATION, TRANSFER OF ASSETS. Merge
        into or consolidate with, or acquire all or substantially all of the
        assets of, any other entity unless (i) there occurs no material change
        in the nature of Borrower's business, and (ii) no violation of this
        Agreement exists at the time of or would exist after such merger,
        consolidation or acquisition, and (iii) if a merger or consolidation,
        Borrower or Smart(Europe), as applicable, is the surviving entity
        (provided that in no




                                      -3-
<PAGE>   4

        event shall Borrower be merged into or consolidated with Smart(Europe)
        unless Borrower is the surviving entity); make any material change in
        the nature of Borrower's business as conducted as of the date hereof;
        nor sell, lease, transfer or otherwise dispose of all or a substantial
        or material portion of Borrower's assets except in the ordinary course
        of its business."

        8.      Except as specifically provided herein, all terms and conditions
of the Credit Agreement remain in full force and effect, without waiver or
modification. All terms defined in the Credit Agreement shall have the same
meaning when used in this Amendment. This Amendment and the Credit Agreement
shall be read together, as one document.

        9.      Borrower hereby remakes all representations and warranties
contained in the Credit Agreement and reaffirms all covenants set forth therein.
Borrower further certifies that as of the date of this Amendment there exists no
Event of Default as defined in the Credit Agreement, nor any condition, act or
event which with the giving of notice or the passage of time or both would
constitute any such Event of Default.



                                      -4-
<PAGE>   5

        IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
executed as of the day and year first written above.



SMART MODULAR TECHNOLOGIES, INC.        WELLS FARGO BANK,
NATIONAL ASSOCIATION


By: /s/ DAVID B. MULLIN                 By: /s/ PETER HOM
   ----------------------------------      -------------------------------------

Title: CFO                              Title: Vice President
   ----------------------------------      -------------------------------------

By: /s/ LATA KRISHNAN
   ----------------------------------

Title: Vice President, Administration
   ----------------------------------


SMART MODULAR TECHNOLOGIES (EUROPE) LIMITED


By: /s/ DAVID B. MULLIN
   ----------------------------------

Title: CFO
   ----------------------------------

By: /s/ LATA KRISHNAN
   ----------------------------------

Title: Vice President, Administration
   ----------------------------------




                                      -5-